effect
stringclasses
48 values
original_source_type
stringlengths
0
23k
opens_and_abbrevs
listlengths
2
92
isa_cross_project_example
bool
1 class
source_definition
stringlengths
9
57.9k
partial_definition
stringlengths
7
23.3k
is_div
bool
2 classes
is_type
null
is_proof
bool
2 classes
completed_definiton
stringlengths
1
250k
dependencies
dict
effect_flags
sequencelengths
0
2
ideal_premises
sequencelengths
0
236
mutual_with
sequencelengths
0
11
file_context
stringlengths
0
407k
interleaved
bool
1 class
is_simply_typed
bool
2 classes
file_name
stringlengths
5
48
vconfig
dict
is_simple_lemma
null
source_type
stringlengths
10
23k
proof_features
sequencelengths
0
1
name
stringlengths
8
95
source
dict
verbose_type
stringlengths
1
7.42k
source_range
dict
Prims.Tot
val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ())))))))))))))))))))))))))
val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool let va_codegen_success_Loop_rounds_52_64 () =
false
null
false
(va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0 ) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0 ) (va_op_xmm_xmm 0 ) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2 ) (va_op_xmm_xmm 10 )) (va_pbool_and (va_codegen_success_Paddd ( va_op_xmm_xmm 1 ) ( va_op_xmm_xmm 9 ) ) (va_ttrue () )) )))))))))))) )))))))))))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Prims.unit", "Vale.X64.Decls.va_pbool_and", "Vale.X64.InsVector.va_codegen_success_Load128_buffer", "Vale.X64.Decls.va_op_heaplet_mem_heaplet", "Vale.X64.Decls.va_op_xmm_xmm", "Vale.X64.Decls.va_op_reg_opr64_reg64", "Vale.X64.Machine_s.rRcx", "Prims.op_Multiply", "Vale.Arch.HeapTypes_s.Secret", "Vale.X64.InsVector.va_codegen_success_Paddd", "Vale.X64.InsSha.va_codegen_success_SHA256_msg2", "Vale.X64.InsSha.va_codegen_success_SHA256_rnds2", "Vale.X64.InsVector.va_codegen_success_Pshufd", "Vale.X64.InsVector.va_codegen_success_Mov128", "Vale.X64.InsVector.va_codegen_success_Palignr4", "Vale.X64.InsBasic.va_codegen_success_Sub64", "Vale.X64.Decls.va_op_dst_opr64_reg64", "Vale.X64.Machine_s.rRdx", "Vale.X64.Decls.va_const_opr64", "Vale.X64.Decls.va_ttrue", "Vale.X64.Decls.va_pbool" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr]
false
true
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool
[]
Vale.SHA.X64.va_codegen_success_Loop_rounds_52_64
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_dummy: Prims.unit -> Vale.X64.Decls.va_pbool
{ "end_col": 31, "end_line": 1118, "start_col": 2, "start_line": 1091 }
Prims.Tot
val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))
val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code let va_code_Loop_rounds_16_51_body i =
false
null
false
(va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Prims.nat", "Vale.X64.Decls.va_Block", "Vale.X64.Decls.va_CCons", "Vale.X64.InsVector.va_code_Load128_buffer", "Vale.X64.Decls.va_op_heaplet_mem_heaplet", "Vale.X64.Decls.va_op_xmm_xmm", "Vale.X64.Decls.va_op_reg_opr64_reg64", "Vale.X64.Machine_s.rRcx", "Prims.op_Multiply", "Vale.Arch.HeapTypes_s.Secret", "Vale.X64.Decls.va_CNil", "Vale.X64.InsVector.va_code_Paddd", "Vale.X64.InsSha.va_code_SHA256_msg2", "Vale.X64.InsSha.va_code_SHA256_rnds2", "Vale.X64.InsVector.va_code_Pshufd", "Vale.X64.InsVector.va_code_Mov128", "Vale.X64.InsVector.va_code_Palignr4", "Vale.X64.InsSha.va_code_SHA256_msg1", "Vale.X64.Decls.va_code" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr]
false
true
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code
[]
Vale.SHA.X64.va_code_Loop_rounds_16_51_body
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
i: Prims.nat -> Vale.X64.Decls.va_code
{ "end_col": 65, "end_line": 603, "start_col": 2, "start_line": 595 }
Prims.Tot
val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ())))))))))))))))))))))))))))))
val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code let va_code_Loop_rounds_52_64 () =
false
null
false
(va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7) ) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0 ) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block ( va_CNil () )) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2 ) (va_op_xmm_xmm 1 )) (va_CCons (va_code_Pshufd ( va_op_xmm_xmm 0 ) ( va_op_xmm_xmm 0 ) 14 ) (va_CCons ( va_code_Sub64 ( va_op_dst_opr64_reg64 rRdx ) ( va_const_opr64 1 ) ) ( va_CCons ( va_code_SHA256_rnds2 ( va_op_xmm_xmm 1 ) ( va_op_xmm_xmm 2 ) ) ( va_CCons ( va_code_Paddd ( va_op_xmm_xmm 2 ) ( va_op_xmm_xmm 10 ) ) ( va_CCons ( va_code_Paddd ( va_op_xmm_xmm 1 ) ( va_op_xmm_xmm 9 ) ) ( va_CNil () ) ) ) ) )) )))))))))))) )))))))))))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Prims.unit", "Vale.X64.Decls.va_Block", "Vale.X64.Decls.va_CCons", "Vale.X64.InsVector.va_code_Load128_buffer", "Vale.X64.Decls.va_op_heaplet_mem_heaplet", "Vale.X64.Decls.va_op_xmm_xmm", "Vale.X64.Decls.va_op_reg_opr64_reg64", "Vale.X64.Machine_s.rRcx", "Prims.op_Multiply", "Vale.Arch.HeapTypes_s.Secret", "Vale.X64.Decls.va_CNil", "Vale.X64.InsVector.va_code_Paddd", "Vale.X64.InsSha.va_code_SHA256_msg2", "Vale.X64.InsSha.va_code_SHA256_rnds2", "Vale.X64.InsVector.va_code_Pshufd", "Vale.X64.InsVector.va_code_Mov128", "Vale.X64.InsVector.va_code_Palignr4", "Vale.X64.InsBasic.va_code_Sub64", "Vale.X64.Decls.va_op_dst_opr64_reg64", "Vale.X64.Machine_s.rRdx", "Vale.X64.Decls.va_const_opr64", "Vale.X64.Decls.va_code" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr]
false
true
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code
[]
Vale.SHA.X64.va_code_Loop_rounds_52_64
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_dummy: Prims.unit -> Vale.X64.Decls.va_code
{ "end_col": 81, "end_line": 1086, "start_col": 2, "start_line": 1065 }
Prims.Tot
val va_wp_Loop_rounds_16_51 (k_b: buffer128) (block: block_w) (hash_orig: hash256) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (())))
val va_wp_Loop_rounds_16_51 (k_b: buffer128) (block: block_w) (hash_orig: hash256) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0 let va_wp_Loop_rounds_16_51 (k_b: buffer128) (block: block_w) (hash_orig: hash256) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0 =
false
null
false
(va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0: quad32) (va_x_xmm1: quad32) (va_x_xmm2: quad32) (va_x_xmm3: quad32) (va_x_xmm4: quad32) (va_x_xmm5: quad32) (va_x_xmm6: quad32) (va_x_xmm7: quad32) (va_x_efl: Vale.X64.Flags.t). let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (())))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Vale.X64.Memory.buffer128", "Vale.SHA.SHA_helpers.block_w", "Vale.SHA.SHA_helpers.hash256", "Vale.X64.Decls.va_state", "Prims.unit", "Prims.l_and", "Prims.b2t", "Vale.X64.Decls.va_get_ok", "Vale.X64.CPU_Features_s.sha_enabled", "Vale.X64.CPU_Features_s.sse_enabled", "Vale.X64.Decls.validSrcAddrs128", "Vale.X64.Decls.va_get_mem_heaplet", "Vale.X64.Decls.va_get_reg64", "Vale.X64.Machine_s.rRcx", "Vale.X64.Decls.va_get_mem_layout", "Vale.Arch.HeapTypes_s.Secret", "Vale.SHA.SHA_helpers.k_reqs", "Vale.X64.Decls.buffer128_as_seq", "Prims.eq2", "Vale.SHA.SHA_helpers.make_hash", "Vale.X64.Decls.va_get_xmm", "Vale.SHA.SHA_helpers.repeat_range_vale", "Prims.op_Multiply", "Vale.Def.Types_s.quad32", "Vale.SHA.SHA_helpers.ws_quad32", "Vale.Arch.Types.add_wrap_quad32", "Vale.SHA.SHA_helpers.ws_partial", "Prims.op_Addition", "Prims.op_Subtraction", "Prims.l_Forall", "Vale.X64.Decls.quad32", "Vale.X64.Flags.t", "Prims.l_imp", "Prims.int", "Vale.X64.State.vale_state", "Vale.X64.Decls.va_upd_flags", "Vale.X64.Decls.va_upd_xmm" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state)
false
true
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_wp_Loop_rounds_16_51 (k_b: buffer128) (block: block_w) (hash_orig: hash256) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0
[]
Vale.SHA.X64.va_wp_Loop_rounds_16_51
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
k_b: Vale.X64.Memory.buffer128 -> block: Vale.SHA.SHA_helpers.block_w -> hash_orig: Vale.SHA.SHA_helpers.hash256 -> va_s0: Vale.X64.Decls.va_state -> va_k: (_: Vale.X64.Decls.va_state -> _: Prims.unit -> Type0) -> Type0
{ "end_col": 10, "end_line": 1029, "start_col": 2, "start_line": 1007 }
Prims.Tot
val va_codegen_success_Loop : va_dummy:unit -> Tot va_pbool
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_codegen_success_Loop () = (va_pbool_and (va_codegen_success_Loop_while0 ()) (va_ttrue ()))
val va_codegen_success_Loop : va_dummy:unit -> Tot va_pbool let va_codegen_success_Loop () =
false
null
false
(va_pbool_and (va_codegen_success_Loop_while0 ()) (va_ttrue ()))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Prims.unit", "Vale.X64.Decls.va_pbool_and", "Vale.SHA.X64.va_codegen_success_Loop_while0", "Vale.X64.Decls.va_ttrue", "Vale.X64.Decls.va_pbool" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ()))) val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_body0 () = (va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_body0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 578 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds in_b k_b (count `op_Multiply` 4) hash_orig) (fun (va_s:va_state) _ -> let (count:nat) = count + 1 in va_QEmpty ((count))))) val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_body0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_body0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_body0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 576 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0 /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_body0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_body0 (va_code_Loop_body0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_body0 ())) = (va_QProc (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop_while0 val va_code_Loop_while0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_while0 () = (va_Block (va_CCons (va_While (va_cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (va_Block (va_CCons (va_code_Loop_body0 ()) (va_CNil ())))) (va_CNil ()))) val va_codegen_success_Loop_while0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_while0 () = (va_pbool_and (va_codegen_success_Loop_body0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_while0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_while0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qWhile va_mods (Cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (fun va_g -> let (count:nat) = let count = va_g in count in qblock va_mods (fun (va_s:va_state) -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_body0 va_old hash_orig in_b k_b count) (fun (va_s:va_state) (count:nat) -> va_QEmpty ((count))))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_ok va_s /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRsi va_old) in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRcx va_s) k_b 16 (va_get_mem_layout va_s) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_s == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_reg64 rRdx va_s) ((count))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in let va_g = (count) in let (count:nat) = va_g in va_QEmpty ((count))))) val va_lemma_Loop_while0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_while0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig))) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_while0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_while0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_while0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~(va_get_reg64 rRdx va_sM > 0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_while0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_while0 (va_code_Loop_while0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_while0 ())) = (va_QProc (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop val va_code_Loop : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop () = (va_Block (va_CCons (va_code_Loop_while0 ()) (va_CNil ()))) val va_codegen_success_Loop : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr]
false
true
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_codegen_success_Loop : va_dummy:unit -> Tot va_pbool
[]
Vale.SHA.X64.va_codegen_success_Loop
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_dummy: Prims.unit -> Vale.X64.Decls.va_pbool
{ "end_col": 66, "end_line": 1909, "start_col": 2, "start_line": 1909 }
Prims.Tot
val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_codegen_success_Loop_body0 () = (va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ()))
val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool let va_codegen_success_Loop_body0 () =
false
null
false
(va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ()))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Prims.unit", "Vale.X64.Decls.va_pbool_and", "Vale.SHA.X64.va_codegen_success_Loop_rounds", "Vale.X64.Decls.va_ttrue", "Vale.X64.Decls.va_pbool" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ()))) val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr]
false
true
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool
[]
Vale.SHA.X64.va_codegen_success_Loop_body0
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_dummy: Prims.unit -> Vale.X64.Decls.va_pbool
{ "end_col": 66, "end_line": 1497, "start_col": 2, "start_line": 1497 }
Prims.Tot
val va_wp_Loop_rounds_52_64 (k_b: buffer128) (block: block_w) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (())))
val va_wp_Loop_rounds_52_64 (k_b: buffer128) (block: block_w) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0 let va_wp_Loop_rounds_52_64 (k_b: buffer128) (block: block_w) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0 =
false
null
false
(va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx: nat64) (va_x_xmm0: quad32) (va_x_xmm1: quad32) (va_x_xmm2: quad32) (va_x_xmm3: quad32) (va_x_xmm4: quad32) (va_x_xmm5: quad32) (va_x_xmm6: quad32) (va_x_xmm7: quad32) (va_x_efl: Vale.X64.Flags.t). let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))) )))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (())))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Vale.X64.Memory.buffer128", "Vale.SHA.SHA_helpers.block_w", "Vale.X64.Decls.va_state", "Prims.unit", "Prims.l_and", "Prims.b2t", "Vale.X64.Decls.va_get_ok", "Vale.X64.CPU_Features_s.sha_enabled", "Vale.X64.CPU_Features_s.sse_enabled", "Vale.X64.Decls.validSrcAddrs128", "Vale.X64.Decls.va_get_mem_heaplet", "Vale.X64.Decls.va_get_reg64", "Vale.X64.Machine_s.rRcx", "Vale.X64.Decls.va_get_mem_layout", "Vale.Arch.HeapTypes_s.Secret", "Prims.op_GreaterThan", "Vale.X64.Machine_s.rRdx", "Vale.SHA.SHA_helpers.k_reqs", "Vale.X64.Decls.buffer128_as_seq", "Prims.eq2", "Vale.SHA.SHA_helpers.hash256", "Vale.SHA.SHA_helpers.make_hash", "Vale.X64.Decls.va_get_xmm", "Vale.SHA.SHA_helpers.repeat_range_vale", "Vale.Def.Types_s.quad32", "Vale.SHA.SHA_helpers.ws_quad32", "Vale.Arch.Types.add_wrap_quad32", "Vale.SHA.SHA_helpers.ws_partial", "Prims.l_Forall", "Vale.X64.Memory.nat64", "Vale.X64.Decls.quad32", "Vale.X64.Flags.t", "Prims.l_imp", "Prims.int", "Prims.op_Subtraction", "Vale.SHA.SHA_helpers.update_block", "Vale.X64.State.vale_state", "Vale.X64.Decls.va_upd_flags", "Vale.X64.Decls.va_upd_xmm", "Vale.X64.Decls.va_upd_reg64" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state ->
false
true
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_wp_Loop_rounds_52_64 (k_b: buffer128) (block: block_w) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0
[]
Vale.SHA.X64.va_wp_Loop_rounds_52_64
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
k_b: Vale.X64.Memory.buffer128 -> block: Vale.SHA.SHA_helpers.block_w -> va_s0: Vale.X64.Decls.va_state -> va_k: (_: Vale.X64.Decls.va_state -> _: Prims.unit -> Type0) -> Type0
{ "end_col": 77, "end_line": 1283, "start_col": 2, "start_line": 1264 }
Prims.Tot
val va_code_Loop_body0 : va_dummy:unit -> Tot va_code
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ())))
val va_code_Loop_body0 : va_dummy:unit -> Tot va_code let va_code_Loop_body0 () =
false
null
false
(va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ())))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Prims.unit", "Vale.X64.Decls.va_Block", "Vale.X64.Decls.va_CCons", "Vale.SHA.X64.va_code_Loop_rounds", "Vale.X64.Decls.va_CNil", "Vale.X64.Decls.va_code" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr]
false
true
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_code_Loop_body0 : va_dummy:unit -> Tot va_code
[]
Vale.SHA.X64.va_code_Loop_body0
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_dummy: Prims.unit -> Vale.X64.Decls.va_code
{ "end_col": 61, "end_line": 1492, "start_col": 2, "start_line": 1492 }
Prims.Tot
val va_code_Epilogue : va_dummy:unit -> Tot va_code
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_code_Epilogue () = (va_Block (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_CNil ())))))))))
val va_code_Epilogue : va_dummy:unit -> Tot va_code let va_code_Epilogue () =
false
null
false
(va_Block (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_CNil ())))))))))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Prims.unit", "Vale.X64.Decls.va_Block", "Vale.X64.Decls.va_CCons", "Vale.X64.InsVector.va_code_Pshufd", "Vale.X64.Decls.va_op_xmm_xmm", "Vale.X64.InsVector.va_code_Shufpd", "Vale.X64.InsVector.va_code_Palignr8", "Vale.X64.InsVector.va_code_Store128_buffer", "Vale.X64.Decls.va_op_heaplet_mem_heaplet", "Vale.X64.Decls.va_op_reg_opr64_reg64", "Vale.X64.Machine_s.rRdi", "Vale.Arch.HeapTypes_s.Secret", "Vale.X64.Decls.va_CNil", "Vale.X64.Decls.va_code" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ()))) val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_body0 () = (va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_body0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 578 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds in_b k_b (count `op_Multiply` 4) hash_orig) (fun (va_s:va_state) _ -> let (count:nat) = count + 1 in va_QEmpty ((count))))) val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_body0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_body0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_body0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 576 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0 /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_body0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_body0 (va_code_Loop_body0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_body0 ())) = (va_QProc (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop_while0 val va_code_Loop_while0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_while0 () = (va_Block (va_CCons (va_While (va_cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (va_Block (va_CCons (va_code_Loop_body0 ()) (va_CNil ())))) (va_CNil ()))) val va_codegen_success_Loop_while0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_while0 () = (va_pbool_and (va_codegen_success_Loop_body0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_while0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_while0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qWhile va_mods (Cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (fun va_g -> let (count:nat) = let count = va_g in count in qblock va_mods (fun (va_s:va_state) -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_body0 va_old hash_orig in_b k_b count) (fun (va_s:va_state) (count:nat) -> va_QEmpty ((count))))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_ok va_s /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRsi va_old) in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRcx va_s) k_b 16 (va_get_mem_layout va_s) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_s == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_reg64 rRdx va_s) ((count))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in let va_g = (count) in let (count:nat) = va_g in va_QEmpty ((count))))) val va_lemma_Loop_while0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_while0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig))) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_while0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_while0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_while0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~(va_get_reg64 rRdx va_sM > 0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_while0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_while0 (va_code_Loop_while0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_while0 ())) = (va_QProc (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop val va_code_Loop : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop () = (va_Block (va_CCons (va_code_Loop_while0 ()) (va_CNil ()))) val va_codegen_success_Loop : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop () = (va_pbool_and (va_codegen_success_Loop_while0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (count:nat) = 0 in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 556 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_while0 va_old_s hash_orig in_b k_b count) (fun (va_s:va_state) count -> va_QEmpty (())))) val va_lemma_Loop : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop va_b0 va_s0 in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop va_mods in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 547 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 548 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == 0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 551 column 90 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) ==> va_k va_sM (()))) val va_wpProof_Loop : in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop (va_code_Loop ()) va_s0 in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (va_QProc (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop in_b k_b) (va_wpProof_Loop in_b k_b)) //-- //-- Epilogue val va_code_Epilogue : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr]
false
true
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_code_Epilogue : va_dummy:unit -> Tot va_code
[]
Vale.SHA.X64.va_code_Epilogue
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_dummy: Prims.unit -> Vale.X64.Decls.va_code
{ "end_col": 82, "end_line": 2039, "start_col": 2, "start_line": 2033 }
Prims.Tot
val va_codegen_success_Sha_update : va_dummy:unit -> Tot va_pbool
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_codegen_success_Sha_update () = (va_pbool_and (va_codegen_success_Preamble ()) (va_pbool_and (va_codegen_success_Loop ()) (va_pbool_and (va_codegen_success_Epilogue ()) (va_ttrue ()))))
val va_codegen_success_Sha_update : va_dummy:unit -> Tot va_pbool let va_codegen_success_Sha_update () =
false
null
false
(va_pbool_and (va_codegen_success_Preamble ()) (va_pbool_and (va_codegen_success_Loop ()) (va_pbool_and (va_codegen_success_Epilogue ()) (va_ttrue ()))))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Prims.unit", "Vale.X64.Decls.va_pbool_and", "Vale.SHA.X64.va_codegen_success_Preamble", "Vale.SHA.X64.va_codegen_success_Loop", "Vale.SHA.X64.va_codegen_success_Epilogue", "Vale.X64.Decls.va_ttrue", "Vale.X64.Decls.va_pbool" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ()))) val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_body0 () = (va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_body0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 578 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds in_b k_b (count `op_Multiply` 4) hash_orig) (fun (va_s:va_state) _ -> let (count:nat) = count + 1 in va_QEmpty ((count))))) val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_body0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_body0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_body0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 576 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0 /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_body0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_body0 (va_code_Loop_body0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_body0 ())) = (va_QProc (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop_while0 val va_code_Loop_while0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_while0 () = (va_Block (va_CCons (va_While (va_cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (va_Block (va_CCons (va_code_Loop_body0 ()) (va_CNil ())))) (va_CNil ()))) val va_codegen_success_Loop_while0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_while0 () = (va_pbool_and (va_codegen_success_Loop_body0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_while0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_while0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qWhile va_mods (Cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (fun va_g -> let (count:nat) = let count = va_g in count in qblock va_mods (fun (va_s:va_state) -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_body0 va_old hash_orig in_b k_b count) (fun (va_s:va_state) (count:nat) -> va_QEmpty ((count))))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_ok va_s /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRsi va_old) in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRcx va_s) k_b 16 (va_get_mem_layout va_s) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_s == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_reg64 rRdx va_s) ((count))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in let va_g = (count) in let (count:nat) = va_g in va_QEmpty ((count))))) val va_lemma_Loop_while0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_while0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig))) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_while0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_while0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_while0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~(va_get_reg64 rRdx va_sM > 0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_while0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_while0 (va_code_Loop_while0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_while0 ())) = (va_QProc (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop val va_code_Loop : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop () = (va_Block (va_CCons (va_code_Loop_while0 ()) (va_CNil ()))) val va_codegen_success_Loop : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop () = (va_pbool_and (va_codegen_success_Loop_while0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (count:nat) = 0 in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 556 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_while0 va_old_s hash_orig in_b k_b count) (fun (va_s:va_state) count -> va_QEmpty (())))) val va_lemma_Loop : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop va_b0 va_s0 in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop va_mods in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 547 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 548 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == 0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 551 column 90 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) ==> va_k va_sM (()))) val va_wpProof_Loop : in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop (va_code_Loop ()) va_s0 in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (va_QProc (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop in_b k_b) (va_wpProof_Loop in_b k_b)) //-- //-- Epilogue val va_code_Epilogue : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Epilogue () = (va_Block (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_CNil ()))))))))) val va_codegen_success_Epilogue : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Epilogue () = (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_ttrue ())))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Epilogue (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Epilogue ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 612 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 613 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 614 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 616 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 617 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 619 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret ctx_b 0) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 620 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret ctx_b 1) (fun (va_s:va_state) _ -> let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 623 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_old_s) (va_get_xmm 2 va_old_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))) val va_lemma_Epilogue : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Epilogue ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Epilogue va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Epilogue va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Epilogue ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 583 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 603 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 606 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Epilogue (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_mem:vale_heap) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_heap0:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_mem va_x_mem va_s0))))) in va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) ==> va_k va_sM (()))) val va_wpProof_Epilogue : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Epilogue ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Epilogue ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Epilogue ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Epilogue (va_code_Epilogue ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Epilogue (ctx_b:buffer128) : (va_quickCode unit (va_code_Epilogue ())) = (va_QProc (va_code_Epilogue ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) (va_wp_Epilogue ctx_b) (va_wpProof_Epilogue ctx_b)) //-- //-- Sha_update val va_code_Sha_update : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Sha_update () = (va_Block (va_CCons (va_code_Preamble ()) (va_CCons (va_code_Loop ()) (va_CCons (va_code_Epilogue ()) (va_CNil ()))))) val va_codegen_success_Sha_update : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr]
false
true
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_codegen_success_Sha_update : va_dummy:unit -> Tot va_pbool
[]
Vale.SHA.X64.va_codegen_success_Sha_update
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_dummy: Prims.unit -> Vale.X64.Decls.va_pbool
{ "end_col": 67, "end_line": 2180, "start_col": 2, "start_line": 2179 }
Prims.Tot
val va_code_Sha_update : va_dummy:unit -> Tot va_code
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_code_Sha_update () = (va_Block (va_CCons (va_code_Preamble ()) (va_CCons (va_code_Loop ()) (va_CCons (va_code_Epilogue ()) (va_CNil ())))))
val va_code_Sha_update : va_dummy:unit -> Tot va_code let va_code_Sha_update () =
false
null
false
(va_Block (va_CCons (va_code_Preamble ()) (va_CCons (va_code_Loop ()) (va_CCons (va_code_Epilogue ()) (va_CNil ())))))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Prims.unit", "Vale.X64.Decls.va_Block", "Vale.X64.Decls.va_CCons", "Vale.SHA.X64.va_code_Preamble", "Vale.SHA.X64.va_code_Loop", "Vale.SHA.X64.va_code_Epilogue", "Vale.X64.Decls.va_CNil", "Vale.X64.Decls.va_code" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ()))) val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_body0 () = (va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_body0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 578 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds in_b k_b (count `op_Multiply` 4) hash_orig) (fun (va_s:va_state) _ -> let (count:nat) = count + 1 in va_QEmpty ((count))))) val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_body0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_body0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_body0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 576 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0 /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_body0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_body0 (va_code_Loop_body0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_body0 ())) = (va_QProc (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop_while0 val va_code_Loop_while0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_while0 () = (va_Block (va_CCons (va_While (va_cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (va_Block (va_CCons (va_code_Loop_body0 ()) (va_CNil ())))) (va_CNil ()))) val va_codegen_success_Loop_while0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_while0 () = (va_pbool_and (va_codegen_success_Loop_body0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_while0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_while0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qWhile va_mods (Cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (fun va_g -> let (count:nat) = let count = va_g in count in qblock va_mods (fun (va_s:va_state) -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_body0 va_old hash_orig in_b k_b count) (fun (va_s:va_state) (count:nat) -> va_QEmpty ((count))))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_ok va_s /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRsi va_old) in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRcx va_s) k_b 16 (va_get_mem_layout va_s) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_s == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_reg64 rRdx va_s) ((count))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in let va_g = (count) in let (count:nat) = va_g in va_QEmpty ((count))))) val va_lemma_Loop_while0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_while0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig))) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_while0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_while0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_while0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~(va_get_reg64 rRdx va_sM > 0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_while0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_while0 (va_code_Loop_while0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_while0 ())) = (va_QProc (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop val va_code_Loop : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop () = (va_Block (va_CCons (va_code_Loop_while0 ()) (va_CNil ()))) val va_codegen_success_Loop : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop () = (va_pbool_and (va_codegen_success_Loop_while0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (count:nat) = 0 in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 556 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_while0 va_old_s hash_orig in_b k_b count) (fun (va_s:va_state) count -> va_QEmpty (())))) val va_lemma_Loop : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop va_b0 va_s0 in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop va_mods in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 547 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 548 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == 0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 551 column 90 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) ==> va_k va_sM (()))) val va_wpProof_Loop : in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop (va_code_Loop ()) va_s0 in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (va_QProc (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop in_b k_b) (va_wpProof_Loop in_b k_b)) //-- //-- Epilogue val va_code_Epilogue : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Epilogue () = (va_Block (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_CNil ()))))))))) val va_codegen_success_Epilogue : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Epilogue () = (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_ttrue ())))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Epilogue (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Epilogue ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 612 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 613 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 614 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 616 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 617 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 619 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret ctx_b 0) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 620 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret ctx_b 1) (fun (va_s:va_state) _ -> let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 623 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_old_s) (va_get_xmm 2 va_old_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))) val va_lemma_Epilogue : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Epilogue ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Epilogue va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Epilogue va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Epilogue ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 583 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 603 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 606 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Epilogue (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_mem:vale_heap) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_heap0:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_mem va_x_mem va_s0))))) in va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) ==> va_k va_sM (()))) val va_wpProof_Epilogue : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Epilogue ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Epilogue ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Epilogue ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Epilogue (va_code_Epilogue ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Epilogue (ctx_b:buffer128) : (va_quickCode unit (va_code_Epilogue ())) = (va_QProc (va_code_Epilogue ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) (va_wp_Epilogue ctx_b) (va_wpProof_Epilogue ctx_b)) //-- //-- Sha_update val va_code_Sha_update : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr]
false
true
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_code_Sha_update : va_dummy:unit -> Tot va_code
[]
Vale.SHA.X64.va_code_Sha_update
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_dummy: Prims.unit -> Vale.X64.Decls.va_code
{ "end_col": 24, "end_line": 2174, "start_col": 2, "start_line": 2173 }
Prims.Tot
val va_codegen_success_Sha_update_bytes_stdcall : win:bool -> Tot va_pbool
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_codegen_success_Sha_update_bytes_stdcall win = (va_pbool_and (va_codegen_success_CreateHeaplets ()) (va_pbool_and (if win then va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 15) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 14) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 13) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 12) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 11) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 10) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 9) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 8) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rR15)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rR14)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rR13)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rR12)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rRsi)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rRdi)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rRbp)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rRbx)) (va_ttrue ())))))))))))))))))) else va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rR15)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rR14)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rR13)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rR12)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rRsi)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rRdi)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rRbp)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rRbx)) (va_ttrue ()))))))))) (va_pbool_and (if win then va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRdi) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRsi) (va_op_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRdx) (va_op_opr64_reg64 rR8)) (va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))) else va_ttrue ()) (va_pbool_and (va_codegen_success_Sha_update_bytes ()) (va_pbool_and (if win then va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rRbp)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rRdi)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rRsi)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rR12)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rR13)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rR14)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rR15)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 8) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 9) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 10) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 11) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 12) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 13) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 14) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 15) (va_op_reg_opr64_reg64 rRax)) (va_ttrue ())))))))))))))))))) else va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rRbp)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rRdi)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rRsi)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rR12)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rR13)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rR14)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rR15)) (va_ttrue ()))))))))) (va_pbool_and (va_codegen_success_DestroyHeaplets ()) (va_ttrue ())))))))
val va_codegen_success_Sha_update_bytes_stdcall : win:bool -> Tot va_pbool let va_codegen_success_Sha_update_bytes_stdcall win =
false
null
false
(va_pbool_and (va_codegen_success_CreateHeaplets ()) (va_pbool_and (if win then va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 15) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 14) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 13) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 12) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 11) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 10) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 9) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 8) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rR15)) (va_pbool_and (va_codegen_success_Push_Secret ( va_op_reg_opr64_reg64 rR14)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rR13)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rR12)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rRsi )) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rRdi)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rRbp)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rRbx)) (va_ttrue ())))))) )))))))))))) else va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rR15)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rR14)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rR13)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rR12)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rRsi) ) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rRdi )) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rRbp)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rRbx)) (va_ttrue ()))))))))) (va_pbool_and (if win then va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRdi) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRsi) (va_op_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRdx) (va_op_opr64_reg64 rR8)) (va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))) else va_ttrue ()) (va_pbool_and (va_codegen_success_Sha_update_bytes ()) (va_pbool_and (if win then va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rRbp)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rRdi )) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rRsi)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rR12)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rR13)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rR14)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rR15)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 8) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 9) (va_op_reg_opr64_reg64 rRax )) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 10) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 11) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 12) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 13) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and ( va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 14 ) (va_op_reg_opr64_reg64 rRax )) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 15 ) (va_op_reg_opr64_reg64 rRax )) (va_ttrue () )))))) )))))))))))) else va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rRbp)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rRdi )) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rRsi)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rR12)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rR13)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rR14)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rR15)) (va_ttrue ()))))))))) (va_pbool_and (va_codegen_success_DestroyHeaplets ()) (va_ttrue ())))))))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Prims.bool", "Vale.X64.Decls.va_pbool_and", "Vale.X64.InsMem.va_codegen_success_CreateHeaplets", "Vale.X64.InsStack.va_codegen_success_PushXmm_Secret", "Vale.X64.Decls.va_op_xmm_xmm", "Vale.X64.Decls.va_op_reg_opr64_reg64", "Vale.X64.Machine_s.rRax", "Vale.X64.InsStack.va_codegen_success_Push_Secret", "Vale.X64.Machine_s.rR15", "Vale.X64.Machine_s.rR14", "Vale.X64.Machine_s.rR13", "Vale.X64.Machine_s.rR12", "Vale.X64.Machine_s.rRsi", "Vale.X64.Machine_s.rRdi", "Vale.X64.Machine_s.rRbp", "Vale.X64.Machine_s.rRbx", "Vale.X64.Decls.va_ttrue", "Vale.X64.Decls.va_pbool", "Vale.X64.InsBasic.va_codegen_success_Mov64", "Vale.X64.Decls.va_op_dst_opr64_reg64", "Vale.X64.Decls.va_op_opr64_reg64", "Vale.X64.Machine_s.rRcx", "Vale.X64.Machine_s.rRdx", "Vale.X64.Machine_s.rR8", "Vale.X64.Machine_s.rR9", "Vale.SHA.X64.va_codegen_success_Sha_update_bytes", "Vale.X64.InsStack.va_codegen_success_Pop_Secret", "Vale.X64.InsStack.va_codegen_success_PopXmm_Secret", "Vale.X64.InsMem.va_codegen_success_DestroyHeaplets" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ()))) val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_body0 () = (va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_body0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 578 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds in_b k_b (count `op_Multiply` 4) hash_orig) (fun (va_s:va_state) _ -> let (count:nat) = count + 1 in va_QEmpty ((count))))) val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_body0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_body0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_body0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 576 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0 /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_body0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_body0 (va_code_Loop_body0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_body0 ())) = (va_QProc (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop_while0 val va_code_Loop_while0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_while0 () = (va_Block (va_CCons (va_While (va_cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (va_Block (va_CCons (va_code_Loop_body0 ()) (va_CNil ())))) (va_CNil ()))) val va_codegen_success_Loop_while0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_while0 () = (va_pbool_and (va_codegen_success_Loop_body0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_while0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_while0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qWhile va_mods (Cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (fun va_g -> let (count:nat) = let count = va_g in count in qblock va_mods (fun (va_s:va_state) -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_body0 va_old hash_orig in_b k_b count) (fun (va_s:va_state) (count:nat) -> va_QEmpty ((count))))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_ok va_s /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRsi va_old) in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRcx va_s) k_b 16 (va_get_mem_layout va_s) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_s == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_reg64 rRdx va_s) ((count))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in let va_g = (count) in let (count:nat) = va_g in va_QEmpty ((count))))) val va_lemma_Loop_while0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_while0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig))) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_while0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_while0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_while0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~(va_get_reg64 rRdx va_sM > 0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_while0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_while0 (va_code_Loop_while0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_while0 ())) = (va_QProc (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop val va_code_Loop : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop () = (va_Block (va_CCons (va_code_Loop_while0 ()) (va_CNil ()))) val va_codegen_success_Loop : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop () = (va_pbool_and (va_codegen_success_Loop_while0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (count:nat) = 0 in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 556 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_while0 va_old_s hash_orig in_b k_b count) (fun (va_s:va_state) count -> va_QEmpty (())))) val va_lemma_Loop : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop va_b0 va_s0 in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop va_mods in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 547 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 548 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == 0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 551 column 90 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) ==> va_k va_sM (()))) val va_wpProof_Loop : in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop (va_code_Loop ()) va_s0 in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (va_QProc (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop in_b k_b) (va_wpProof_Loop in_b k_b)) //-- //-- Epilogue val va_code_Epilogue : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Epilogue () = (va_Block (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_CNil ()))))))))) val va_codegen_success_Epilogue : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Epilogue () = (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_ttrue ())))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Epilogue (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Epilogue ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 612 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 613 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 614 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 616 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 617 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 619 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret ctx_b 0) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 620 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret ctx_b 1) (fun (va_s:va_state) _ -> let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 623 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_old_s) (va_get_xmm 2 va_old_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))) val va_lemma_Epilogue : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Epilogue ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Epilogue va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Epilogue va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Epilogue ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 583 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 603 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 606 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Epilogue (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_mem:vale_heap) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_heap0:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_mem va_x_mem va_s0))))) in va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) ==> va_k va_sM (()))) val va_wpProof_Epilogue : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Epilogue ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Epilogue ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Epilogue ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Epilogue (va_code_Epilogue ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Epilogue (ctx_b:buffer128) : (va_quickCode unit (va_code_Epilogue ())) = (va_QProc (va_code_Epilogue ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) (va_wp_Epilogue ctx_b) (va_wpProof_Epilogue ctx_b)) //-- //-- Sha_update val va_code_Sha_update : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Sha_update () = (va_Block (va_CCons (va_code_Preamble ()) (va_CCons (va_code_Loop ()) (va_CCons (va_code_Epilogue ()) (va_CNil ()))))) val va_codegen_success_Sha_update : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Sha_update () = (va_pbool_and (va_codegen_success_Preamble ()) (va_pbool_and (va_codegen_success_Loop ()) (va_pbool_and (va_codegen_success_Epilogue ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Sha_update (va_mods:va_mods_t) (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 667 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Preamble ctx_b) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 668 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop in_b k_b) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 669 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Epilogue ctx_b) (va_QEmpty (())))))) val va_lemma_Sha_update : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Sha_update ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))))))))))))))) [@"opaque_to_smt"] let va_lemma_Sha_update va_b0 va_s0 ctx_b in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Sha_update va_mods ctx_b in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Sha_update ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 627 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 653 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 662 column 103 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 665 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Sha_update (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_mem:vale_heap) (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_heap0:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi (va_upd_mem va_x_mem va_s0)))))))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) ==> va_k va_sM (()))) val va_wpProof_Sha_update : ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Sha_update ctx_b in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Sha_update ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Sha_update ctx_b in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Sha_update (va_code_Sha_update ()) va_s0 ctx_b in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Sha_update (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update ())) = (va_QProc (va_code_Sha_update ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) (va_wp_Sha_update ctx_b in_b k_b) (va_wpProof_Sha_update ctx_b in_b k_b)) //-- //-- Sha_update_bytes #push-options "--z3rlimit 80" #restart-solver val va_code_Sha_update_bytes : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Sha_update_bytes () = (va_Block (va_CCons (va_code_Sha_update ()) (va_CCons (va_Block (va_CNil ())) (va_CNil ())))) val va_codegen_success_Sha_update_bytes : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Sha_update_bytes () = (va_pbool_and (va_codegen_success_Sha_update ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Sha_update_bytes (va_mods:va_mods_t) (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update_bytes ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 714 column 15 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sha_update ctx_b in_b k_b) (fun (va_s:va_state) _ -> let (old_ctx:(seq (four nat32))) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_old_s) ctx_b in let (new_ctx:(seq (four nat32))) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) ctx_b in let (va_arg34:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = old_ctx in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 717 column 24 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_hash_to_bytes va_arg34) (let (va_arg33:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = new_ctx in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 718 column 24 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_hash_to_bytes va_arg33) (let (hash_in:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes old_ctx) in let (hash_out:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes new_ctx) in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 728 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_old_s)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_old_s) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 730 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (hash_out == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_in) (let (va_arg32:(FStar.Seq.Base.seq Vale.SHA.SHA_helpers.byte)) = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes input_LE) in let (va_arg31:(FStar.Seq.Base.seq Vale.Def.Words_s.nat8)) = Vale.Def.Types_s.le_seq_quad32_to_bytes input_LE in let (va_arg30:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = input_LE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 731 column 34 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_equiv_vale hash_in hash_out va_arg30 input_BE va_arg31 va_arg32) (va_QEmpty (()))))))))) val va_lemma_Sha_update_bytes : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Sha_update_bytes ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 ctx_b == 2 /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 in_b == 4 `op_Multiply` va_get_reg64 rRdx va_s0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let hash_in = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) ctx_b)) in let hash_out = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) ctx_b)) in (let input_LE = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b)) in l_and (FStar.Seq.Base.length #FStar.UInt8.t input_LE `op_Modulus` 64 == 0) (hash_out == Vale.SHA.SHA_helpers.update_multi_opaque_vale hash_in input_LE)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))))))))))))))) [@"opaque_to_smt"] let va_lemma_Sha_update_bytes va_b0 va_s0 ctx_b in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Sha_update_bytes va_mods ctx_b in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Sha_update_bytes ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 672 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 702 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 704 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_in = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) ctx_b)) in label va_range1 "***** POSTCONDITION NOT MET AT line 705 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_out = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) ctx_b)) in label va_range1 "***** POSTCONDITION NOT MET AT line 709 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b)) in l_and (FStar.Seq.Base.length #FStar.UInt8.t input_LE `op_Modulus` 64 == 0) (hash_out == Vale.SHA.SHA_helpers.update_multi_opaque_vale hash_in input_LE)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 712 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Sha_update_bytes (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 ctx_b == 2 /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 in_b == 4 `op_Multiply` va_get_reg64 rRdx va_s0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_mem:vale_heap) (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_heap0:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi (va_upd_mem va_x_mem va_s0)))))))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let hash_in = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) ctx_b)) in let hash_out = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) ctx_b)) in (let input_LE = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b)) in l_and (FStar.Seq.Base.length #FStar.UInt8.t input_LE `op_Modulus` 64 == 0) (hash_out == Vale.SHA.SHA_helpers.update_multi_opaque_vale hash_in input_LE)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM))) ==> va_k va_sM (()))) val va_wpProof_Sha_update_bytes : ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Sha_update_bytes ctx_b in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Sha_update_bytes ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Sha_update_bytes ctx_b in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Sha_update_bytes (va_code_Sha_update_bytes ()) va_s0 ctx_b in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Sha_update_bytes (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update_bytes ())) = (va_QProc (va_code_Sha_update_bytes ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) (va_wp_Sha_update_bytes ctx_b in_b k_b) (va_wpProof_Sha_update_bytes ctx_b in_b k_b)) #pop-options //-- //-- Sha_update_bytes_stdcall #push-options "--z3rlimit 80" #restart-solver [@ "opaque_to_smt" va_qattr] let va_code_Sha_update_bytes_stdcall win = (va_Block (va_CCons (va_code_CreateHeaplets ()) (va_CCons (if win then va_Block (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 15) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 14) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 13) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 12) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 11) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 10) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 9) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 8) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR15)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR14)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR13)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR12)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRsi)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRdi)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRbp)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRbx)) (va_CNil ()))))))))))))))))))) else va_Block (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR15)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR14)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR13)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR12)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRsi)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRdi)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRbp)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRbx)) (va_CNil ())))))))))) (va_CCons (if win then va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRdi) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRsi) (va_op_opr64_reg64 rRdx)) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRdx) (va_op_opr64_reg64 rR8)) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))) else va_Block (va_CNil ())) (va_CCons (va_code_Sha_update_bytes ()) (va_CCons (if win then va_Block (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRbx)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRbp)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRdi)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRsi)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR12)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR13)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR14)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR15)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 8) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 9) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 10) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 11) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 12) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 13) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 14) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 15) (va_op_reg_opr64_reg64 rRax)) (va_CNil ()))))))))))))))))))) else va_Block (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRbx)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRbp)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRdi)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRsi)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR12)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR13)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR14)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR15)) (va_CNil ())))))))))) (va_CCons (va_code_DestroyHeaplets ()) (va_CNil ())))))))) [@ "opaque_to_smt" va_qattr]
false
true
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 80, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_codegen_success_Sha_update_bytes_stdcall : win:bool -> Tot va_pbool
[]
Vale.SHA.X64.va_codegen_success_Sha_update_bytes_stdcall
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
win: Prims.bool -> Vale.X64.Decls.va_pbool
{ "end_col": 77, "end_line": 2641, "start_col": 2, "start_line": 2579 }
Prims.Tot
val va_codegen_success_Epilogue : va_dummy:unit -> Tot va_pbool
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_codegen_success_Epilogue () = (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_ttrue ()))))))))
val va_codegen_success_Epilogue : va_dummy:unit -> Tot va_pbool let va_codegen_success_Epilogue () =
false
null
false
(va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_ttrue ()))))))))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Prims.unit", "Vale.X64.Decls.va_pbool_and", "Vale.X64.InsVector.va_codegen_success_Pshufd", "Vale.X64.Decls.va_op_xmm_xmm", "Vale.X64.InsVector.va_codegen_success_Shufpd", "Vale.X64.InsVector.va_codegen_success_Palignr8", "Vale.X64.InsVector.va_codegen_success_Store128_buffer", "Vale.X64.Decls.va_op_heaplet_mem_heaplet", "Vale.X64.Decls.va_op_reg_opr64_reg64", "Vale.X64.Machine_s.rRdi", "Vale.Arch.HeapTypes_s.Secret", "Vale.X64.Decls.va_ttrue", "Vale.X64.Decls.va_pbool" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ()))) val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_body0 () = (va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_body0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 578 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds in_b k_b (count `op_Multiply` 4) hash_orig) (fun (va_s:va_state) _ -> let (count:nat) = count + 1 in va_QEmpty ((count))))) val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_body0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_body0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_body0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 576 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0 /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_body0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_body0 (va_code_Loop_body0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_body0 ())) = (va_QProc (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop_while0 val va_code_Loop_while0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_while0 () = (va_Block (va_CCons (va_While (va_cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (va_Block (va_CCons (va_code_Loop_body0 ()) (va_CNil ())))) (va_CNil ()))) val va_codegen_success_Loop_while0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_while0 () = (va_pbool_and (va_codegen_success_Loop_body0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_while0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_while0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qWhile va_mods (Cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (fun va_g -> let (count:nat) = let count = va_g in count in qblock va_mods (fun (va_s:va_state) -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_body0 va_old hash_orig in_b k_b count) (fun (va_s:va_state) (count:nat) -> va_QEmpty ((count))))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_ok va_s /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRsi va_old) in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRcx va_s) k_b 16 (va_get_mem_layout va_s) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_s == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_reg64 rRdx va_s) ((count))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in let va_g = (count) in let (count:nat) = va_g in va_QEmpty ((count))))) val va_lemma_Loop_while0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_while0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig))) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_while0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_while0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_while0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~(va_get_reg64 rRdx va_sM > 0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_while0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_while0 (va_code_Loop_while0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_while0 ())) = (va_QProc (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop val va_code_Loop : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop () = (va_Block (va_CCons (va_code_Loop_while0 ()) (va_CNil ()))) val va_codegen_success_Loop : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop () = (va_pbool_and (va_codegen_success_Loop_while0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (count:nat) = 0 in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 556 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_while0 va_old_s hash_orig in_b k_b count) (fun (va_s:va_state) count -> va_QEmpty (())))) val va_lemma_Loop : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop va_b0 va_s0 in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop va_mods in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 547 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 548 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == 0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 551 column 90 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) ==> va_k va_sM (()))) val va_wpProof_Loop : in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop (va_code_Loop ()) va_s0 in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (va_QProc (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop in_b k_b) (va_wpProof_Loop in_b k_b)) //-- //-- Epilogue val va_code_Epilogue : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Epilogue () = (va_Block (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_CNil ()))))))))) val va_codegen_success_Epilogue : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr]
false
true
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_codegen_success_Epilogue : va_dummy:unit -> Tot va_pbool
[]
Vale.SHA.X64.va_codegen_success_Epilogue
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_dummy: Prims.unit -> Vale.X64.Decls.va_pbool
{ "end_col": 24, "end_line": 2052, "start_col": 2, "start_line": 2044 }
Prims.Tot
val va_qcode_Sha_update (va_mods: va_mods_t) (ctx_b in_b k_b: buffer128) : (va_quickCode unit (va_code_Sha_update ()))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_qcode_Sha_update (va_mods:va_mods_t) (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 667 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Preamble ctx_b) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 668 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop in_b k_b) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 669 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Epilogue ctx_b) (va_QEmpty (()))))))
val va_qcode_Sha_update (va_mods: va_mods_t) (ctx_b in_b k_b: buffer128) : (va_quickCode unit (va_code_Sha_update ())) let va_qcode_Sha_update (va_mods: va_mods_t) (ctx_b in_b k_b: buffer128) : (va_quickCode unit (va_code_Sha_update ())) =
false
null
false
(qblock va_mods (fun (va_s: va_state) -> let va_old_s:va_state = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 667 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Preamble ctx_b) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 668 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop in_b k_b) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 669 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Epilogue ctx_b) (va_QEmpty (()))))))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Vale.X64.QuickCode.va_mods_t", "Vale.X64.Memory.buffer128", "Vale.X64.QuickCodes.qblock", "Prims.unit", "Prims.Cons", "Vale.X64.Decls.va_code", "Vale.SHA.X64.va_code_Preamble", "Vale.SHA.X64.va_code_Loop", "Vale.SHA.X64.va_code_Epilogue", "Prims.Nil", "Vale.X64.Machine_s.precode", "Vale.X64.Decls.ins", "Vale.X64.Decls.ocmp", "Vale.X64.Decls.va_state", "Vale.X64.QuickCodes.va_QSeq", "Vale.X64.QuickCodes.va_range1", "Vale.SHA.X64.va_quick_Preamble", "Vale.SHA.X64.va_quick_Loop", "Vale.SHA.X64.va_quick_Epilogue", "Vale.X64.QuickCodes.va_QEmpty", "Vale.X64.State.vale_state", "Vale.X64.QuickCodes.quickCodes", "Vale.X64.QuickCode.va_quickCode", "Vale.SHA.X64.va_code_Sha_update" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ()))) val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_body0 () = (va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_body0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 578 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds in_b k_b (count `op_Multiply` 4) hash_orig) (fun (va_s:va_state) _ -> let (count:nat) = count + 1 in va_QEmpty ((count))))) val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_body0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_body0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_body0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 576 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0 /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_body0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_body0 (va_code_Loop_body0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_body0 ())) = (va_QProc (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop_while0 val va_code_Loop_while0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_while0 () = (va_Block (va_CCons (va_While (va_cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (va_Block (va_CCons (va_code_Loop_body0 ()) (va_CNil ())))) (va_CNil ()))) val va_codegen_success_Loop_while0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_while0 () = (va_pbool_and (va_codegen_success_Loop_body0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_while0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_while0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qWhile va_mods (Cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (fun va_g -> let (count:nat) = let count = va_g in count in qblock va_mods (fun (va_s:va_state) -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_body0 va_old hash_orig in_b k_b count) (fun (va_s:va_state) (count:nat) -> va_QEmpty ((count))))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_ok va_s /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRsi va_old) in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRcx va_s) k_b 16 (va_get_mem_layout va_s) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_s == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_reg64 rRdx va_s) ((count))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in let va_g = (count) in let (count:nat) = va_g in va_QEmpty ((count))))) val va_lemma_Loop_while0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_while0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig))) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_while0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_while0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_while0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~(va_get_reg64 rRdx va_sM > 0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_while0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_while0 (va_code_Loop_while0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_while0 ())) = (va_QProc (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop val va_code_Loop : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop () = (va_Block (va_CCons (va_code_Loop_while0 ()) (va_CNil ()))) val va_codegen_success_Loop : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop () = (va_pbool_and (va_codegen_success_Loop_while0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (count:nat) = 0 in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 556 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_while0 va_old_s hash_orig in_b k_b count) (fun (va_s:va_state) count -> va_QEmpty (())))) val va_lemma_Loop : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop va_b0 va_s0 in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop va_mods in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 547 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 548 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == 0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 551 column 90 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) ==> va_k va_sM (()))) val va_wpProof_Loop : in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop (va_code_Loop ()) va_s0 in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (va_QProc (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop in_b k_b) (va_wpProof_Loop in_b k_b)) //-- //-- Epilogue val va_code_Epilogue : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Epilogue () = (va_Block (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_CNil ()))))))))) val va_codegen_success_Epilogue : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Epilogue () = (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_ttrue ())))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Epilogue (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Epilogue ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 612 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 613 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 614 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 616 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 617 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 619 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret ctx_b 0) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 620 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret ctx_b 1) (fun (va_s:va_state) _ -> let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 623 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_old_s) (va_get_xmm 2 va_old_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))) val va_lemma_Epilogue : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Epilogue ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Epilogue va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Epilogue va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Epilogue ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 583 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 603 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 606 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Epilogue (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_mem:vale_heap) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_heap0:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_mem va_x_mem va_s0))))) in va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) ==> va_k va_sM (()))) val va_wpProof_Epilogue : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Epilogue ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Epilogue ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Epilogue ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Epilogue (va_code_Epilogue ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Epilogue (ctx_b:buffer128) : (va_quickCode unit (va_code_Epilogue ())) = (va_QProc (va_code_Epilogue ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) (va_wp_Epilogue ctx_b) (va_wpProof_Epilogue ctx_b)) //-- //-- Sha_update val va_code_Sha_update : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Sha_update () = (va_Block (va_CCons (va_code_Preamble ()) (va_CCons (va_code_Loop ()) (va_CCons (va_code_Epilogue ()) (va_CNil ()))))) val va_codegen_success_Sha_update : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Sha_update () = (va_pbool_and (va_codegen_success_Preamble ()) (va_pbool_and (va_codegen_success_Loop ()) (va_pbool_and (va_codegen_success_Epilogue ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Sha_update (va_mods:va_mods_t) (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) :
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_qcode_Sha_update (va_mods: va_mods_t) (ctx_b in_b k_b: buffer128) : (va_quickCode unit (va_code_Sha_update ()))
[]
Vale.SHA.X64.va_qcode_Sha_update
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_mods: Vale.X64.QuickCode.va_mods_t -> ctx_b: Vale.X64.Memory.buffer128 -> in_b: Vale.X64.Memory.buffer128 -> k_b: Vale.X64.Memory.buffer128 -> Vale.X64.QuickCode.va_quickCode Prims.unit (Vale.SHA.X64.va_code_Sha_update ())
{ "end_col": 50, "end_line": 2191, "start_col": 2, "start_line": 2185 }
Prims.Tot
val va_qcode_Epilogue (va_mods: va_mods_t) (ctx_b: buffer128) : (va_quickCode unit (va_code_Epilogue ()))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_qcode_Epilogue (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Epilogue ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 612 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 613 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 614 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 616 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 617 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 619 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret ctx_b 0) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 620 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret ctx_b 1) (fun (va_s:va_state) _ -> let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 623 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_old_s) (va_get_xmm 2 va_old_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (())))))))))))
val va_qcode_Epilogue (va_mods: va_mods_t) (ctx_b: buffer128) : (va_quickCode unit (va_code_Epilogue ())) let va_qcode_Epilogue (va_mods: va_mods_t) (ctx_b: buffer128) : (va_quickCode unit (va_code_Epilogue ())) =
false
null
false
(qblock va_mods (fun (va_s: va_state) -> let va_old_s:va_state = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 612 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 613 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 614 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 616 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 617 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 619 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret ctx_b 0) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 620 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret ctx_b 1) (fun (va_s: va_state) _ -> let abcd:Vale.X64.Decls.quad32 = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let efgh:Vale.X64.Decls.quad32 = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 623 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_old_s) (va_get_xmm 2 va_old_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (())))))))))))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Vale.X64.QuickCode.va_mods_t", "Vale.X64.Memory.buffer128", "Vale.X64.QuickCodes.qblock", "Prims.unit", "Prims.Cons", "Vale.X64.Decls.va_code", "Vale.X64.InsVector.va_code_Pshufd", "Vale.X64.Decls.va_op_xmm_xmm", "Vale.X64.InsVector.va_code_Shufpd", "Vale.X64.InsVector.va_code_Palignr8", "Vale.X64.InsVector.va_code_Store128_buffer", "Vale.X64.Decls.va_op_heaplet_mem_heaplet", "Vale.X64.Decls.va_op_reg_opr64_reg64", "Vale.X64.Machine_s.rRdi", "Vale.Arch.HeapTypes_s.Secret", "Prims.Nil", "Vale.X64.Machine_s.precode", "Vale.X64.Decls.ins", "Vale.X64.Decls.ocmp", "Vale.X64.Decls.va_state", "Vale.X64.QuickCodes.va_QSeq", "Vale.X64.QuickCodes.va_range1", "Vale.X64.InsVector.va_quick_Pshufd", "Vale.X64.InsVector.va_quick_Shufpd", "Vale.X64.InsVector.va_quick_Palignr8", "Vale.X64.InsVector.va_quick_Store128_buffer", "Vale.X64.QuickCodes.va_QBind", "Vale.X64.QuickCodes.va_qAssert", "FStar.Seq.Base.equal", "Vale.SHA.SHA_helpers.word", "Vale.SHA.SHA_helpers.make_hash", "Vale.X64.Decls.va_get_xmm", "Vale.SHA.SHA_helpers.make_ordered_hash", "Vale.X64.QuickCodes.va_QEmpty", "Vale.Def.Types_s.quad32", "Vale.X64.Decls.buffer128_read", "Vale.X64.Decls.va_get_mem_heaplet", "Vale.X64.QuickCodes.quickCodes", "Vale.X64.State.vale_state", "Vale.X64.QuickCode.va_quickCode", "Vale.SHA.X64.va_code_Epilogue" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ()))) val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_body0 () = (va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_body0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 578 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds in_b k_b (count `op_Multiply` 4) hash_orig) (fun (va_s:va_state) _ -> let (count:nat) = count + 1 in va_QEmpty ((count))))) val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_body0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_body0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_body0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 576 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0 /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_body0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_body0 (va_code_Loop_body0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_body0 ())) = (va_QProc (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop_while0 val va_code_Loop_while0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_while0 () = (va_Block (va_CCons (va_While (va_cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (va_Block (va_CCons (va_code_Loop_body0 ()) (va_CNil ())))) (va_CNil ()))) val va_codegen_success_Loop_while0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_while0 () = (va_pbool_and (va_codegen_success_Loop_body0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_while0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_while0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qWhile va_mods (Cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (fun va_g -> let (count:nat) = let count = va_g in count in qblock va_mods (fun (va_s:va_state) -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_body0 va_old hash_orig in_b k_b count) (fun (va_s:va_state) (count:nat) -> va_QEmpty ((count))))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_ok va_s /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRsi va_old) in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRcx va_s) k_b 16 (va_get_mem_layout va_s) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_s == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_reg64 rRdx va_s) ((count))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in let va_g = (count) in let (count:nat) = va_g in va_QEmpty ((count))))) val va_lemma_Loop_while0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_while0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig))) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_while0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_while0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_while0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~(va_get_reg64 rRdx va_sM > 0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_while0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_while0 (va_code_Loop_while0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_while0 ())) = (va_QProc (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop val va_code_Loop : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop () = (va_Block (va_CCons (va_code_Loop_while0 ()) (va_CNil ()))) val va_codegen_success_Loop : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop () = (va_pbool_and (va_codegen_success_Loop_while0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (count:nat) = 0 in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 556 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_while0 va_old_s hash_orig in_b k_b count) (fun (va_s:va_state) count -> va_QEmpty (())))) val va_lemma_Loop : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop va_b0 va_s0 in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop va_mods in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 547 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 548 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == 0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 551 column 90 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) ==> va_k va_sM (()))) val va_wpProof_Loop : in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop (va_code_Loop ()) va_s0 in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (va_QProc (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop in_b k_b) (va_wpProof_Loop in_b k_b)) //-- //-- Epilogue val va_code_Epilogue : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Epilogue () = (va_Block (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_CNil ()))))))))) val va_codegen_success_Epilogue : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Epilogue () = (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_ttrue ())))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Epilogue (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Epilogue
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_qcode_Epilogue (va_mods: va_mods_t) (ctx_b: buffer128) : (va_quickCode unit (va_code_Epilogue ()))
[]
Vale.SHA.X64.va_qcode_Epilogue
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_mods: Vale.X64.QuickCode.va_mods_t -> ctx_b: Vale.X64.Memory.buffer128 -> Vale.X64.QuickCode.va_quickCode Prims.unit (Vale.SHA.X64.va_code_Epilogue ())
{ "end_col": 29, "end_line": 2080, "start_col": 2, "start_line": 2057 }
Prims.Tot
val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))))))))))))))))))))))))))))))))))
val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool let va_codegen_success_Loop_rounds_0_15 () =
false
null
false
(va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9 ) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3 ) (va_op_xmm_xmm 4 )) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx ) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0 ) (va_op_xmm_xmm 5 )) (va_pbool_and (va_codegen_success_PshufbStable ( va_op_xmm_xmm 6 ) ( va_op_xmm_xmm 7 ) ) (va_pbool_and ( va_codegen_success_SHA256_rnds2 ( va_op_xmm_xmm 2 ) ( va_op_xmm_xmm 1 ) ) ( va_pbool_and ( va_codegen_success_Pshufd ( va_op_xmm_xmm 0 ) ( va_op_xmm_xmm 0 ) 14 ) ( va_pbool_and ( va_codegen_success_Mov128 ( va_op_xmm_xmm 7 ) ( va_op_xmm_xmm 6 ) ) ( va_pbool_and ( va_codegen_success_Palignr4 ( va_op_xmm_xmm 7 ) ( va_op_xmm_xmm 5 ) ) ( va_pbool_and ( va_codegen_success_Paddd ( va_op_xmm_xmm 3 ) ( va_op_xmm_xmm 7 ) ) ( va_pbool_and ( va_codegen_success_SHA256_msg1 ( va_op_xmm_xmm 4 ) ( va_op_xmm_xmm 5 ) ) ( va_pbool_and ( va_codegen_success_SHA256_rnds2 ( va_op_xmm_xmm 1 ) ( va_op_xmm_xmm 2 ) ) ( va_pbool_and ( va_codegen_success_Load128_buffer ( va_op_heaplet_mem_heaplet 0 ) ( va_op_xmm_xmm 0 ) ( va_op_reg_opr64_reg64 rRcx ) 48 Secret ) ( va_pbool_and ( va_codegen_success_Paddd ( va_op_xmm_xmm 0 ) ( va_op_xmm_xmm 6 ) ) ( va_pbool_and ( va_codegen_success_SHA256_msg2 ( va_op_xmm_xmm 3 ) ( va_op_xmm_xmm 6 ) ) ( va_pbool_and ( va_codegen_success_SHA256_rnds2 ( va_op_xmm_xmm 2 ) ( va_op_xmm_xmm 1 ) ) ( va_pbool_and ( va_codegen_success_Pshufd ( va_op_xmm_xmm 0 ) ( va_op_xmm_xmm 0 ) 14 ) ( va_pbool_and ( va_codegen_success_Mov128 ( va_op_xmm_xmm 7 ) ( va_op_xmm_xmm 3 ) ) ( va_pbool_and ( va_codegen_success_Palignr4 ( va_op_xmm_xmm 7 ) ( va_op_xmm_xmm 6 ) ) ( va_pbool_and ( va_codegen_success_Paddd ( va_op_xmm_xmm 4 ) ( va_op_xmm_xmm 7 ) ) ( va_pbool_and ( va_codegen_success_SHA256_msg1 ( va_op_xmm_xmm 5 ) ( va_op_xmm_xmm 6 ) ) ( va_pbool_and ( va_codegen_success_SHA256_rnds2 ( va_op_xmm_xmm 1 ) ( va_op_xmm_xmm 2 ) ) ( va_ttrue () ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )) )))))))))))) )))))))))))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Prims.unit", "Vale.X64.Decls.va_pbool_and", "Vale.X64.InsVector.va_codegen_success_Load128_buffer", "Vale.X64.Decls.va_op_heaplet_mem_heaplet", "Vale.X64.Decls.va_op_xmm_xmm", "Vale.X64.Decls.va_op_reg_opr64_reg64", "Vale.X64.Machine_s.rRsi", "Vale.Arch.HeapTypes_s.Secret", "Vale.X64.InsVector.va_codegen_success_PshufbStable", "Vale.X64.Machine_s.rRcx", "Vale.X64.InsVector.va_codegen_success_Paddd", "Vale.X64.InsVector.va_codegen_success_Mov128", "Vale.X64.InsSha.va_codegen_success_SHA256_rnds2", "Vale.X64.InsVector.va_codegen_success_Pshufd", "Vale.X64.InsBasic.va_codegen_success_Add64", "Vale.X64.Decls.va_op_dst_opr64_reg64", "Vale.X64.Decls.va_const_opr64", "Vale.X64.InsSha.va_codegen_success_SHA256_msg1", "Vale.X64.InsVector.va_codegen_success_Palignr4", "Vale.X64.InsSha.va_codegen_success_SHA256_msg2", "Vale.X64.Decls.va_ttrue", "Vale.X64.Decls.va_pbool" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr]
false
true
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool
[]
Vale.SHA.X64.va_codegen_success_Loop_rounds_0_15
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_dummy: Prims.unit -> Vale.X64.Decls.va_pbool
{ "end_col": 48, "end_line": 284, "start_col": 2, "start_line": 241 }
Prims.Tot
val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ())))))))
val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool let va_codegen_success_Msg_shift () =
false
null
false
(va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ())))))))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Prims.unit", "Vale.X64.Decls.va_pbool_and", "Vale.X64.InsVector.va_codegen_success_Mov128", "Vale.X64.Decls.va_op_xmm_xmm", "Vale.X64.Decls.va_ttrue", "Vale.X64.Decls.va_pbool" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr]
false
true
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool
[]
Vale.SHA.X64.va_codegen_success_Msg_shift
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_dummy: Prims.unit -> Vale.X64.Decls.va_pbool
{ "end_col": 87, "end_line": 790, "start_col": 2, "start_line": 785 }
Prims.Tot
val va_qcode_Msg_shift (va_mods: va_mods_t) : (va_quickCode unit (va_code_Msg_shift ()))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (())))))))))
val va_qcode_Msg_shift (va_mods: va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) let va_qcode_Msg_shift (va_mods: va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) =
false
null
false
(qblock va_mods (fun (va_s: va_state) -> let va_old_s:va_state = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (())))))))))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Vale.X64.QuickCode.va_mods_t", "Vale.X64.QuickCodes.qblock", "Prims.unit", "Prims.Cons", "Vale.X64.Decls.va_code", "Vale.X64.InsVector.va_code_Mov128", "Vale.X64.Decls.va_op_xmm_xmm", "Prims.Nil", "Vale.X64.Machine_s.precode", "Vale.X64.Decls.ins", "Vale.X64.Decls.ocmp", "Vale.X64.Decls.va_state", "Vale.X64.QuickCodes.va_QSeq", "Vale.X64.QuickCodes.va_range1", "Vale.X64.InsVector.va_quick_Mov128", "Vale.X64.QuickCodes.va_QEmpty", "Vale.X64.State.vale_state", "Vale.X64.QuickCodes.quickCodes", "Vale.X64.QuickCode.va_quickCode", "Vale.SHA.X64.va_code_Msg_shift" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr]
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_qcode_Msg_shift (va_mods: va_mods_t) : (va_quickCode unit (va_code_Msg_shift ()))
[]
Vale.SHA.X64.va_qcode_Msg_shift
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_mods: Vale.X64.QuickCode.va_mods_t -> Vale.X64.QuickCode.va_quickCode Prims.unit (Vale.SHA.X64.va_code_Msg_shift ())
{ "end_col": 81, "end_line": 806, "start_col": 2, "start_line": 794 }
Prims.Tot
val va_wp_Msg_shift (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (())))
val va_wp_Msg_shift (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0 let va_wp_Msg_shift (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0 =
false
null
false
(va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3: quad32) (va_x_xmm4: quad32) (va_x_xmm5: quad32) (va_x_xmm6: quad32) (va_x_xmm7: quad32) (va_x_xmm0: quad32). let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (())))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Vale.X64.Decls.va_state", "Prims.unit", "Prims.l_and", "Prims.b2t", "Vale.X64.Decls.va_get_ok", "Vale.X64.CPU_Features_s.sse_enabled", "Prims.l_Forall", "Vale.X64.Decls.quad32", "Prims.l_imp", "Prims.eq2", "Vale.X64.Decls.va_get_xmm", "Vale.X64.State.vale_state", "Vale.X64.Decls.va_upd_xmm" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr]
false
true
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_wp_Msg_shift (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0
[]
Vale.SHA.X64.va_wp_Msg_shift
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_s0: Vale.X64.Decls.va_state -> va_k: (_: Vale.X64.Decls.va_state -> _: Prims.unit -> Type0) -> Type0
{ "end_col": 92, "end_line": 847, "start_col": 2, "start_line": 842 }
Prims.Tot
val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ()))
val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool let va_codegen_success_Loop_rounds_16_51 () =
false
null
false
(va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ()))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Prims.unit", "Vale.X64.Decls.va_pbool_and", "Vale.SHA.X64.va_codegen_success_Loop_rounds_16_51_recursive", "Vale.X64.Decls.va_ttrue", "Vale.X64.Decls.va_pbool" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"]
false
true
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool
[]
Vale.SHA.X64.va_codegen_success_Loop_rounds_16_51
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_dummy: Prims.unit -> Vale.X64.Decls.va_pbool
{ "end_col": 82, "end_line": 963, "start_col": 2, "start_line": 963 }
Prims.Tot
val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ()))))
val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool let va_codegen_success_Loop_rounds () =
false
null
false
(va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ()))))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Prims.unit", "Vale.X64.Decls.va_pbool_and", "Vale.SHA.X64.va_codegen_success_Loop_rounds_0_15", "Vale.SHA.X64.va_codegen_success_Loop_rounds_16_51", "Vale.SHA.X64.va_codegen_success_Loop_rounds_52_64", "Vale.X64.Decls.va_ttrue", "Vale.X64.Decls.va_pbool" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr]
false
true
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool
[]
Vale.SHA.X64.va_codegen_success_Loop_rounds
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_dummy: Prims.unit -> Vale.X64.Decls.va_pbool
{ "end_col": 24, "end_line": 1326, "start_col": 2, "start_line": 1324 }
Prims.Tot
val va_code_Loop_rounds : va_dummy:unit -> Tot va_code
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ()))))))
val va_code_Loop_rounds : va_dummy:unit -> Tot va_code let va_code_Loop_rounds () =
false
null
false
(va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ()))))))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Prims.unit", "Vale.X64.Decls.va_Block", "Vale.X64.Decls.va_CCons", "Vale.X64.Decls.va_CNil", "Vale.SHA.X64.va_code_Loop_rounds_0_15", "Vale.SHA.X64.va_code_Loop_rounds_16_51", "Vale.SHA.X64.va_code_Loop_rounds_52_64", "Vale.X64.Decls.va_code" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr]
false
true
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_code_Loop_rounds : va_dummy:unit -> Tot va_code
[]
Vale.SHA.X64.va_code_Loop_rounds
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_dummy: Prims.unit -> Vale.X64.Decls.va_code
{ "end_col": 93, "end_line": 1319, "start_col": 2, "start_line": 1318 }
Prims.Tot
val va_quick_Loop_rounds_16_51_body (i: nat) (k_b: buffer128) (block: block_w) (hash_orig: hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig))
val va_quick_Loop_rounds_16_51_body (i: nat) (k_b: buffer128) (block: block_w) (hash_orig: hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) let va_quick_Loop_rounds_16_51_body (i: nat) (k_b: buffer128) (block: block_w) (hash_orig: hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) =
false
null
false
(va_QProc (va_code_Loop_rounds_16_51_body i) ([ va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0 ]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Prims.nat", "Vale.X64.Memory.buffer128", "Vale.SHA.SHA_helpers.block_w", "Vale.SHA.SHA_helpers.hash256", "Vale.X64.QuickCode.va_QProc", "Prims.unit", "Vale.SHA.X64.va_code_Loop_rounds_16_51_body", "Prims.Cons", "Vale.X64.QuickCode.mod_t", "Vale.X64.QuickCode.va_Mod_flags", "Vale.X64.QuickCode.va_Mod_xmm", "Prims.Nil", "Vale.SHA.X64.va_wp_Loop_rounds_16_51_body", "Vale.SHA.X64.va_wpProof_Loop_rounds_16_51_body", "Vale.X64.QuickCode.va_quickCode" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) :
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_quick_Loop_rounds_16_51_body (i: nat) (k_b: buffer128) (block: block_w) (hash_orig: hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i))
[]
Vale.SHA.X64.va_quick_Loop_rounds_16_51_body
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
i: Prims.nat -> k_b: Vale.X64.Memory.buffer128 -> block: Vale.SHA.SHA_helpers.block_w -> hash_orig: Vale.SHA.SHA_helpers.hash256 -> Vale.X64.QuickCode.va_quickCode Prims.unit (Vale.SHA.X64.va_code_Loop_rounds_16_51_body i)
{ "end_col": 21, "end_line": 769, "start_col": 2, "start_line": 766 }
Prims.Tot
val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i])
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ()))))
val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) let rec va_codegen_success_Loop_rounds_16_51_recursive i =
false
null
false
(va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ()))))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total", "" ]
[ "Prims.nat", "Vale.X64.Decls.va_pbool_and", "Prims.op_GreaterThan", "Vale.SHA.X64.va_codegen_success_Loop_rounds_16_51_recursive", "Prims.op_Subtraction", "Vale.X64.Decls.va_ttrue", "Prims.bool", "Vale.X64.Decls.va_pbool", "Vale.SHA.X64.va_codegen_success_Loop_rounds_16_51_body", "Vale.SHA.X64.va_codegen_success_Msg_shift" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"]
false
true
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i])
[ "recursion" ]
Vale.SHA.X64.va_codegen_success_Loop_rounds_16_51_recursive
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
i: Prims.nat -> Prims.Tot Vale.X64.Decls.va_pbool
{ "end_col": 68, "end_line": 887, "start_col": 2, "start_line": 885 }
Prims.Tot
val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i])
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ())))))
val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) let rec va_code_Loop_rounds_16_51_recursive i =
false
null
false
(va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))) ))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total", "" ]
[ "Prims.nat", "Vale.X64.Decls.va_Block", "Vale.X64.Decls.va_CCons", "Prims.op_GreaterThan", "Vale.SHA.X64.va_code_Loop_rounds_16_51_recursive", "Prims.op_Subtraction", "Vale.X64.Decls.va_CNil", "Prims.bool", "Vale.X64.Decls.va_code", "Vale.SHA.X64.va_code_Loop_rounds_16_51_body", "Vale.SHA.X64.va_code_Msg_shift" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"]
false
true
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i])
[ "recursion" ]
Vale.SHA.X64.va_code_Loop_rounds_16_51_recursive
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
i: Prims.nat -> Prims.Tot Vale.X64.Decls.va_code
{ "end_col": 53, "end_line": 880, "start_col": 2, "start_line": 878 }
Prims.Tot
val va_wp_Loop_rounds_16_51_body (i: nat) (k_b: buffer128) (block: block_w) (hash_orig: hash256) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (())))
val va_wp_Loop_rounds_16_51_body (i: nat) (k_b: buffer128) (block: block_w) (hash_orig: hash256) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0 let va_wp_Loop_rounds_16_51_body (i: nat) (k_b: buffer128) (block: block_w) (hash_orig: hash256) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0 =
false
null
false
(va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0: quad32) (va_x_xmm1: quad32) (va_x_xmm2: quad32) (va_x_xmm3: quad32) (va_x_xmm4: quad32) (va_x_xmm5: quad32) (va_x_xmm6: quad32) (va_x_xmm7: quad32) (va_x_efl: Vale.X64.Flags.t). let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (())))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Prims.nat", "Vale.X64.Memory.buffer128", "Vale.SHA.SHA_helpers.block_w", "Vale.SHA.SHA_helpers.hash256", "Vale.X64.Decls.va_state", "Prims.unit", "Prims.l_and", "Prims.b2t", "Vale.X64.Decls.va_get_ok", "Vale.X64.CPU_Features_s.sha_enabled", "Vale.X64.CPU_Features_s.sse_enabled", "Vale.X64.Decls.validSrcAddrs128", "Vale.X64.Decls.va_get_mem_heaplet", "Vale.X64.Decls.va_get_reg64", "Vale.X64.Machine_s.rRcx", "Vale.X64.Decls.va_get_mem_layout", "Vale.Arch.HeapTypes_s.Secret", "Prims.op_LessThanOrEqual", "Prims.op_LessThan", "Vale.SHA.SHA_helpers.k_reqs", "Vale.X64.Decls.buffer128_as_seq", "Prims.eq2", "Vale.SHA.SHA_helpers.make_hash", "Vale.X64.Decls.va_get_xmm", "Vale.SHA.SHA_helpers.repeat_range_vale", "Prims.op_Multiply", "Vale.Def.Types_s.quad32", "Vale.SHA.SHA_helpers.ws_quad32", "Vale.Arch.Types.add_wrap_quad32", "Vale.SHA.SHA_helpers.ws_partial", "Prims.op_Addition", "Prims.op_Subtraction", "Prims.l_Forall", "Vale.X64.Decls.quad32", "Vale.X64.Flags.t", "Prims.l_imp", "Vale.X64.State.vale_state", "Vale.X64.Decls.va_upd_flags", "Vale.X64.Decls.va_upd_xmm" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256)
false
true
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_wp_Loop_rounds_16_51_body (i: nat) (k_b: buffer128) (block: block_w) (hash_orig: hash256) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0
[]
Vale.SHA.X64.va_wp_Loop_rounds_16_51_body
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
i: Prims.nat -> k_b: Vale.X64.Memory.buffer128 -> block: Vale.SHA.SHA_helpers.block_w -> hash_orig: Vale.SHA.SHA_helpers.hash256 -> va_s0: Vale.X64.Decls.va_state -> va_k: (_: Vale.X64.Decls.va_state -> _: Prims.unit -> Type0) -> Type0
{ "end_col": 83, "end_line": 740, "start_col": 2, "start_line": 718 }
Prims.Tot
val va_qcode_Loop_rounds_16_51_body (va_mods: va_mods_t) (i: nat) (k_b: buffer128) (block: block_w) (hash_orig: hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (())))))))))))))))
val va_qcode_Loop_rounds_16_51_body (va_mods: va_mods_t) (i: nat) (k_b: buffer128) (block: block_w) (hash_orig: hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) let va_qcode_Loop_rounds_16_51_body (va_mods: va_mods_t) (i: nat) (k_b: buffer128) (block: block_w) (hash_orig: hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) =
false
null
false
(qblock va_mods (fun (va_s: va_state) -> let va_old_s:va_state = va_s in let ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s: va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337: (FStar.Seq.Base.seq a_336)) (i_338: Prims.nat) -> let i_312:Prims.nat = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3) ) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (())))))))))))))))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Vale.X64.QuickCode.va_mods_t", "Prims.nat", "Vale.X64.Memory.buffer128", "Vale.SHA.SHA_helpers.block_w", "Vale.SHA.SHA_helpers.hash256", "Vale.X64.QuickCodes.qblock", "Prims.unit", "Prims.Cons", "Vale.X64.Decls.va_code", "Vale.X64.InsVector.va_code_Load128_buffer", "Vale.X64.Decls.va_op_heaplet_mem_heaplet", "Vale.X64.Decls.va_op_xmm_xmm", "Vale.X64.Decls.va_op_reg_opr64_reg64", "Vale.X64.Machine_s.rRcx", "Prims.op_Multiply", "Vale.Arch.HeapTypes_s.Secret", "Vale.X64.Machine_s.Block", "Vale.X64.Decls.ins", "Vale.X64.Decls.ocmp", "Prims.Nil", "Vale.X64.Machine_s.precode", "Vale.X64.InsVector.va_code_Paddd", "Vale.X64.InsSha.va_code_SHA256_msg2", "Vale.X64.InsSha.va_code_SHA256_rnds2", "Vale.X64.InsVector.va_code_Pshufd", "Vale.X64.InsVector.va_code_Mov128", "Vale.X64.InsVector.va_code_Palignr4", "Vale.X64.InsSha.va_code_SHA256_msg1", "Vale.X64.Decls.va_state", "Vale.X64.QuickCodes.va_QBind", "Vale.X64.QuickCodes.va_range1", "Vale.X64.InsVector.va_quick_Load128_buffer", "Vale.X64.QuickCodes.va_qAssertSquash", "Prims.b2t", "Prims.op_LessThan", "FStar.Seq.Base.length", "Vale.X64.Decls.quad32", "Prims.squash", "Vale.X64.QuickCodes.va_qAssert", "Prims.eq2", "Vale.X64.Decls.va_get_xmm", "FStar.Seq.Base.index", "Vale.X64.QuickCodes.va_QSeq", "Vale.X64.InsVector.va_quick_Paddd", "Vale.X64.InsSha.va_quick_SHA256_msg2", "Prims.op_Addition", "Vale.X64.InsSha.va_quick_SHA256_rnds2", "Vale.X64.InsVector.va_quick_Pshufd", "Vale.X64.InsVector.va_quick_Mov128", "Vale.X64.InsVector.va_quick_Palignr4", "Vale.X64.InsSha.va_quick_SHA256_msg1", "Vale.X64.QuickCodes.va_QEmpty", "Vale.X64.QuickCodes.quickCodes", "FStar.Seq.Base.seq", "Vale.Def.Types_s.quad32", "Vale.X64.Decls.buffer128_as_seq", "Vale.X64.Decls.va_get_mem_heaplet", "Vale.X64.State.vale_state", "Vale.X64.QuickCode.va_quickCode", "Vale.SHA.X64.va_code_Loop_rounds_16_51_body" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w)
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_qcode_Loop_rounds_16_51_body (va_mods: va_mods_t) (i: nat) (k_b: buffer128) (block: block_w) (hash_orig: hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i))
[]
Vale.SHA.X64.va_qcode_Loop_rounds_16_51_body
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_mods: Vale.X64.QuickCode.va_mods_t -> i: Prims.nat -> k_b: Vale.X64.Memory.buffer128 -> block: Vale.SHA.SHA_helpers.block_w -> hash_orig: Vale.SHA.SHA_helpers.hash256 -> Vale.X64.QuickCode.va_quickCode Prims.unit (Vale.SHA.X64.va_code_Loop_rounds_16_51_body i)
{ "end_col": 44, "end_line": 656, "start_col": 2, "start_line": 623 }
Prims.Ghost
val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM)
val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig =
false
null
false
va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let va_old_s:va_state = va_s0 in let va_b1:va_codes = va_get_block va_b0 in let va_s11, va_fc11 = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let va_sM, va_f11 = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM)
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[]
[ "Vale.X64.Decls.va_code", "Vale.X64.Decls.va_state", "Vale.X64.Memory.buffer128", "Vale.SHA.SHA_helpers.block_w", "Vale.SHA.SHA_helpers.hash256", "Vale.X64.Decls.va_fuel", "FStar.Pervasives.Native.Mktuple2", "Vale.X64.Decls.va_lemma_merge_total", "FStar.Pervasives.Native.tuple2", "Vale.X64.State.vale_state", "Vale.X64.Decls.va_lemma_empty_total", "Prims.list", "Vale.X64.Machine_s.precode", "Vale.X64.Decls.ins", "Vale.X64.Decls.ocmp", "Vale.X64.Decls.va_tl", "Vale.SHA.X64.va_lemma_Loop_rounds_16_51_recursive", "Vale.X64.Decls.va_hd", "Vale.X64.Decls.va_get_block", "Prims.unit", "Vale.X64.Decls.va_reveal_opaque", "Vale.SHA.X64.va_code_Loop_rounds_16_51" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"]
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))))
[]
Vale.SHA.X64.va_lemma_Loop_rounds_16_51
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_b0: Vale.X64.Decls.va_code -> va_s0: Vale.X64.Decls.va_state -> k_b: Vale.X64.Memory.buffer128 -> block: Vale.SHA.SHA_helpers.block_w -> hash_orig: Vale.SHA.SHA_helpers.hash256 -> Prims.Ghost (Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel)
{ "end_col": 16, "end_line": 1002, "start_col": 2, "start_line": 994 }
Prims.Tot
val va_code_Loop_while0 : va_dummy:unit -> Tot va_code
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_code_Loop_while0 () = (va_Block (va_CCons (va_While (va_cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (va_Block (va_CCons (va_code_Loop_body0 ()) (va_CNil ())))) (va_CNil ())))
val va_code_Loop_while0 : va_dummy:unit -> Tot va_code let va_code_Loop_while0 () =
false
null
false
(va_Block (va_CCons (va_While (va_cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (va_Block (va_CCons (va_code_Loop_body0 ()) (va_CNil ())))) (va_CNil ())))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Prims.unit", "Vale.X64.Decls.va_Block", "Vale.X64.Decls.va_CCons", "Vale.X64.Decls.va_While", "Vale.X64.Decls.va_cmp_gt", "Vale.X64.Decls.va_op_cmp_reg64", "Vale.X64.Machine_s.rRdx", "Vale.X64.Decls.va_const_cmp", "Vale.SHA.X64.va_code_Loop_body0", "Vale.X64.Decls.va_CNil", "Vale.X64.Decls.va_code" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ()))) val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_body0 () = (va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_body0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 578 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds in_b k_b (count `op_Multiply` 4) hash_orig) (fun (va_s:va_state) _ -> let (count:nat) = count + 1 in va_QEmpty ((count))))) val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_body0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_body0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_body0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 576 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0 /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_body0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_body0 (va_code_Loop_body0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_body0 ())) = (va_QProc (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop_while0 val va_code_Loop_while0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr]
false
true
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_code_Loop_while0 : va_dummy:unit -> Tot va_code
[]
Vale.SHA.X64.va_code_Loop_while0
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_dummy: Prims.unit -> Vale.X64.Decls.va_code
{ "end_col": 68, "end_line": 1689, "start_col": 2, "start_line": 1688 }
Prims.Tot
val va_quick_Loop_rounds (in_b k_b: buffer128) (offset: nat) (hash_orig: hash256) : (va_quickCode unit (va_code_Loop_rounds ()))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig))
val va_quick_Loop_rounds (in_b k_b: buffer128) (offset: nat) (hash_orig: hash256) : (va_quickCode unit (va_code_Loop_rounds ())) let va_quick_Loop_rounds (in_b k_b: buffer128) (offset: nat) (hash_orig: hash256) : (va_quickCode unit (va_code_Loop_rounds ())) =
false
null
false
(va_QProc (va_code_Loop_rounds ()) ([ va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi ]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Vale.X64.Memory.buffer128", "Prims.nat", "Vale.SHA.SHA_helpers.hash256", "Vale.X64.QuickCode.va_QProc", "Prims.unit", "Vale.SHA.X64.va_code_Loop_rounds", "Prims.Cons", "Vale.X64.QuickCode.mod_t", "Vale.X64.QuickCode.va_Mod_flags", "Vale.X64.QuickCode.va_Mod_xmm", "Vale.X64.QuickCode.va_Mod_reg64", "Vale.X64.Machine_s.rRdx", "Vale.X64.Machine_s.rRsi", "Prims.Nil", "Vale.SHA.X64.va_wp_Loop_rounds", "Vale.SHA.X64.va_wpProof_Loop_rounds", "Vale.X64.QuickCode.va_quickCode" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) :
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_quick_Loop_rounds (in_b k_b: buffer128) (offset: nat) (hash_orig: hash256) : (va_quickCode unit (va_code_Loop_rounds ()))
[]
Vale.SHA.X64.va_quick_Loop_rounds
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
in_b: Vale.X64.Memory.buffer128 -> k_b: Vale.X64.Memory.buffer128 -> offset: Prims.nat -> hash_orig: Vale.SHA.SHA_helpers.hash256 -> Vale.X64.QuickCode.va_quickCode Prims.unit (Vale.SHA.X64.va_code_Loop_rounds ())
{ "end_col": 55, "end_line": 1485, "start_col": 2, "start_line": 1482 }
Prims.Ghost
val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM)
val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) let va_lemma_Preamble va_b0 va_s0 ctx_b =
false
null
false
let va_mods:va_mods_t = [ va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok ] in let va_qc = va_qcode_Preamble va_mods ctx_b in let va_sM, va_fM, va_g = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([ va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok ]) va_sM va_s0; (va_sM, va_fM)
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[]
[ "Vale.X64.Decls.va_code", "Vale.X64.Decls.va_state", "Vale.X64.Memory.buffer128", "Vale.X64.QuickCodes.fuel", "Prims.unit", "FStar.Pervasives.Native.Mktuple2", "Vale.X64.Decls.va_fuel", "Vale.X64.QuickCode.va_lemma_norm_mods", "Prims.Cons", "Vale.X64.QuickCode.mod_t", "Vale.X64.QuickCode.va_Mod_flags", "Vale.X64.QuickCode.va_Mod_xmm", "Vale.X64.QuickCode.va_Mod_reg64", "Vale.X64.Machine_s.rRax", "Vale.X64.QuickCode.va_Mod_ok", "Prims.Nil", "FStar.Pervasives.assert_norm", "Prims.eq2", "Prims.list", "Vale.X64.QuickCode.__proj__QProc__item__mods", "Vale.SHA.X64.va_code_Preamble", "FStar.Pervasives.Native.tuple2", "FStar.Pervasives.Native.tuple3", "Vale.X64.State.vale_state", "Vale.X64.QuickCodes.va_wp_sound_code_norm", "Prims.l_and", "Vale.X64.QuickCodes.label", "Vale.X64.QuickCodes.va_range1", "Prims.b2t", "Vale.X64.Decls.va_get_ok", "Vale.X64.Decls.quad32", "Vale.X64.Decls.va_get_xmm", "Vale.Def.Words_s.four", "Vale.Def.Types_s.nat32", "Vale.Def.Words_s.Mkfour", "Vale.Def.Words_s.__proj__Mkfour__item__lo1", "Vale.Def.Words_s.__proj__Mkfour__item__lo0", "Vale.Def.Words_s.__proj__Mkfour__item__hi3", "Vale.Def.Words_s.__proj__Mkfour__item__hi2", "Vale.SHA.SHA_helpers.hash256", "Vale.SHA.SHA_helpers.make_hash", "Vale.SHA.SHA_helpers.make_ordered_hash", "Vale.Def.Types_s.quad32", "Vale.X64.Decls.buffer128_read", "Vale.X64.Decls.va_get_mem_heaplet", "Vale.X64.QuickCode.quickCode", "Vale.SHA.X64.va_qcode_Preamble" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))))
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))))
[]
Vale.SHA.X64.va_lemma_Preamble
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_b0: Vale.X64.Decls.va_code -> va_s0: Vale.X64.Decls.va_state -> ctx_b: Vale.X64.Memory.buffer128 -> Prims.Ghost (Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel)
{ "end_col": 16, "end_line": 143, "start_col": 41, "start_line": 115 }
Prims.Tot
val va_qcode_Loop_rounds (va_mods: va_mods_t) (in_b k_b: buffer128) (offset: nat) (hash_orig: hash256) : (va_quickCode unit (va_code_Loop_rounds ()))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (()))))))))
val va_qcode_Loop_rounds (va_mods: va_mods_t) (in_b k_b: buffer128) (offset: nat) (hash_orig: hash256) : (va_quickCode unit (va_code_Loop_rounds ())) let va_qcode_Loop_rounds (va_mods: va_mods_t) (in_b k_b: buffer128) (offset: nat) (hash_orig: hash256) : (va_quickCode unit (va_code_Loop_rounds ())) =
false
null
false
(qblock va_mods (fun (va_s: va_state) -> let va_old_s:va_state = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583: (FStar.Seq.Base.seq a_1582)) (i_1584: Prims.nat) (j_1585: Prims.nat) -> let j_1545:Prims.nat = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let block:block_w = Vale.SHA.SHA_helpers.quads_to_block input_BE in let hash_init:Vale.SHA.SHA_helpers.hash256 = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s: va_state) _ -> let va_arg27:Prims.nat = offset in let va_arg26:Vale.SHA.SHA_helpers.hash256 = hash_orig in let va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_: unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (()))))))))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Vale.X64.QuickCode.va_mods_t", "Vale.X64.Memory.buffer128", "Prims.nat", "Vale.SHA.SHA_helpers.hash256", "Vale.X64.QuickCodes.qblock", "Prims.unit", "Prims.Cons", "Vale.X64.Decls.va_code", "Vale.X64.Machine_s.Block", "Vale.X64.Decls.ins", "Vale.X64.Decls.ocmp", "Prims.Nil", "Vale.X64.Machine_s.precode", "Vale.SHA.X64.va_code_Loop_rounds_0_15", "Vale.SHA.X64.va_code_Loop_rounds_16_51", "Vale.SHA.X64.va_code_Loop_rounds_52_64", "Vale.X64.Decls.va_state", "Vale.X64.QuickCodes.va_qAssertSquash", "Vale.X64.QuickCodes.va_range1", "Prims.b2t", "Prims.op_AmpAmp", "Prims.op_LessThanOrEqual", "FStar.Seq.Base.length", "Vale.X64.Decls.quad32", "Vale.X64.Decls.buffer128_as_seq", "Vale.X64.Decls.va_get_mem_heaplet", "Prims.op_Addition", "Prims.squash", "Vale.X64.QuickCodes.va_QSeq", "Vale.SHA.X64.va_quick_Loop_rounds_0_15", "Vale.SHA.X64.va_quick_Loop_rounds_16_51", "Vale.X64.QuickCodes.va_QBind", "Vale.SHA.X64.va_quick_Loop_rounds_52_64", "Vale.X64.QuickCodes.va_qPURE", "Prims.pure_post", "Prims.l_and", "Vale.Def.Types_s.quad32", "Prims.l_Forall", "Prims.l_imp", "Prims.eq2", "Vale.SHA.SHA_helpers.update_block", "Vale.SHA.SHA_helpers.update_multi_quads", "Vale.Arch.Types.reverse_bytes_nat32_quad32_seq", "FStar.Seq.Base.slice", "Vale.SHA.SHA_helpers.quads_to_block", "Vale.SHA.SHA_helpers.lemma_update_multi_quads", "Vale.X64.QuickCodes.va_QEmpty", "FStar.Seq.Base.seq", "Vale.X64.QuickCodes.quickCodes", "Vale.SHA.SHA_helpers.make_hash", "Vale.X64.Decls.va_get_xmm", "Vale.SHA.SHA_helpers.block_w", "Vale.X64.State.vale_state", "Vale.X64.QuickCode.va_quickCode", "Vale.SHA.X64.va_code_Loop_rounds" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat)
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_qcode_Loop_rounds (va_mods: va_mods_t) (in_b k_b: buffer128) (offset: nat) (hash_orig: hash256) : (va_quickCode unit (va_code_Loop_rounds ()))
[]
Vale.SHA.X64.va_qcode_Loop_rounds
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_mods: Vale.X64.QuickCode.va_mods_t -> in_b: Vale.X64.Memory.buffer128 -> k_b: Vale.X64.Memory.buffer128 -> offset: Prims.nat -> hash_orig: Vale.SHA.SHA_helpers.hash256 -> Vale.X64.QuickCode.va_quickCode Prims.unit (Vale.SHA.X64.va_code_Loop_rounds ())
{ "end_col": 26, "end_line": 1356, "start_col": 2, "start_line": 1331 }
Prims.Ghost
val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g))))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k =
false
null
false
let va_sM, va_f0 = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([ va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0 ]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[]
[ "Vale.X64.Memory.buffer128", "Vale.SHA.SHA_helpers.block_w", "Vale.SHA.SHA_helpers.hash256", "Vale.X64.Decls.va_state", "Prims.unit", "Vale.X64.Decls.va_fuel", "FStar.Pervasives.Native.Mktuple3", "Vale.X64.QuickCode.va_lemma_norm_mods", "Prims.Cons", "Vale.X64.QuickCode.mod_t", "Vale.X64.QuickCode.va_Mod_flags", "Vale.X64.QuickCode.va_Mod_xmm", "Prims.Nil", "Prims._assert", "Vale.X64.Decls.va_state_eq", "Vale.X64.Decls.va_update_flags", "Vale.X64.Decls.va_update_xmm", "Vale.X64.Decls.va_update_ok", "Vale.X64.Decls.va_lemma_upd_update", "FStar.Pervasives.Native.tuple3", "FStar.Pervasives.Native.tuple2", "Vale.X64.State.vale_state", "Vale.SHA.X64.va_lemma_Loop_rounds_16_51", "Vale.SHA.X64.va_code_Loop_rounds_16_51" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g))))
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g))))
[]
Vale.SHA.X64.va_wpProof_Loop_rounds_16_51
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
k_b: Vale.X64.Memory.buffer128 -> block: Vale.SHA.SHA_helpers.block_w -> hash_orig: Vale.SHA.SHA_helpers.hash256 -> va_s0: Vale.X64.Decls.va_state -> va_k: (_: Vale.X64.Decls.va_state -> _: Prims.unit -> Type0) -> Prims.Ghost ((Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel) * Prims.unit)
{ "end_col": 22, "end_line": 1050, "start_col": 65, "start_line": 1040 }
Prims.Tot
val va_quick_Sha_update_bytes (ctx_b in_b k_b: buffer128) : (va_quickCode unit (va_code_Sha_update_bytes ()))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_quick_Sha_update_bytes (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update_bytes ())) = (va_QProc (va_code_Sha_update_bytes ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) (va_wp_Sha_update_bytes ctx_b in_b k_b) (va_wpProof_Sha_update_bytes ctx_b in_b k_b))
val va_quick_Sha_update_bytes (ctx_b in_b k_b: buffer128) : (va_quickCode unit (va_code_Sha_update_bytes ())) let va_quick_Sha_update_bytes (ctx_b in_b k_b: buffer128) : (va_quickCode unit (va_code_Sha_update_bytes ())) =
false
null
false
(va_QProc (va_code_Sha_update_bytes ()) ([ va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem ]) (va_wp_Sha_update_bytes ctx_b in_b k_b) (va_wpProof_Sha_update_bytes ctx_b in_b k_b))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Vale.X64.Memory.buffer128", "Vale.X64.QuickCode.va_QProc", "Prims.unit", "Vale.SHA.X64.va_code_Sha_update_bytes", "Prims.Cons", "Vale.X64.QuickCode.mod_t", "Vale.X64.QuickCode.va_Mod_flags", "Vale.X64.QuickCode.va_Mod_mem_heaplet", "Vale.X64.QuickCode.va_Mod_xmm", "Vale.X64.QuickCode.va_Mod_reg64", "Vale.X64.Machine_s.rRax", "Vale.X64.Machine_s.rRdx", "Vale.X64.Machine_s.rRsi", "Vale.X64.QuickCode.va_Mod_mem", "Prims.Nil", "Vale.SHA.X64.va_wp_Sha_update_bytes", "Vale.SHA.X64.va_wpProof_Sha_update_bytes", "Vale.X64.QuickCode.va_quickCode" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ()))) val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_body0 () = (va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_body0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 578 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds in_b k_b (count `op_Multiply` 4) hash_orig) (fun (va_s:va_state) _ -> let (count:nat) = count + 1 in va_QEmpty ((count))))) val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_body0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_body0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_body0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 576 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0 /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_body0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_body0 (va_code_Loop_body0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_body0 ())) = (va_QProc (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop_while0 val va_code_Loop_while0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_while0 () = (va_Block (va_CCons (va_While (va_cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (va_Block (va_CCons (va_code_Loop_body0 ()) (va_CNil ())))) (va_CNil ()))) val va_codegen_success_Loop_while0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_while0 () = (va_pbool_and (va_codegen_success_Loop_body0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_while0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_while0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qWhile va_mods (Cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (fun va_g -> let (count:nat) = let count = va_g in count in qblock va_mods (fun (va_s:va_state) -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_body0 va_old hash_orig in_b k_b count) (fun (va_s:va_state) (count:nat) -> va_QEmpty ((count))))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_ok va_s /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRsi va_old) in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRcx va_s) k_b 16 (va_get_mem_layout va_s) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_s == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_reg64 rRdx va_s) ((count))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in let va_g = (count) in let (count:nat) = va_g in va_QEmpty ((count))))) val va_lemma_Loop_while0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_while0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig))) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_while0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_while0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_while0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~(va_get_reg64 rRdx va_sM > 0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_while0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_while0 (va_code_Loop_while0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_while0 ())) = (va_QProc (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop val va_code_Loop : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop () = (va_Block (va_CCons (va_code_Loop_while0 ()) (va_CNil ()))) val va_codegen_success_Loop : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop () = (va_pbool_and (va_codegen_success_Loop_while0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (count:nat) = 0 in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 556 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_while0 va_old_s hash_orig in_b k_b count) (fun (va_s:va_state) count -> va_QEmpty (())))) val va_lemma_Loop : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop va_b0 va_s0 in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop va_mods in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 547 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 548 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == 0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 551 column 90 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) ==> va_k va_sM (()))) val va_wpProof_Loop : in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop (va_code_Loop ()) va_s0 in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (va_QProc (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop in_b k_b) (va_wpProof_Loop in_b k_b)) //-- //-- Epilogue val va_code_Epilogue : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Epilogue () = (va_Block (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_CNil ()))))))))) val va_codegen_success_Epilogue : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Epilogue () = (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_ttrue ())))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Epilogue (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Epilogue ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 612 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 613 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 614 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 616 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 617 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 619 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret ctx_b 0) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 620 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret ctx_b 1) (fun (va_s:va_state) _ -> let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 623 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_old_s) (va_get_xmm 2 va_old_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))) val va_lemma_Epilogue : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Epilogue ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Epilogue va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Epilogue va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Epilogue ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 583 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 603 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 606 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Epilogue (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_mem:vale_heap) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_heap0:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_mem va_x_mem va_s0))))) in va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) ==> va_k va_sM (()))) val va_wpProof_Epilogue : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Epilogue ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Epilogue ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Epilogue ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Epilogue (va_code_Epilogue ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Epilogue (ctx_b:buffer128) : (va_quickCode unit (va_code_Epilogue ())) = (va_QProc (va_code_Epilogue ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) (va_wp_Epilogue ctx_b) (va_wpProof_Epilogue ctx_b)) //-- //-- Sha_update val va_code_Sha_update : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Sha_update () = (va_Block (va_CCons (va_code_Preamble ()) (va_CCons (va_code_Loop ()) (va_CCons (va_code_Epilogue ()) (va_CNil ()))))) val va_codegen_success_Sha_update : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Sha_update () = (va_pbool_and (va_codegen_success_Preamble ()) (va_pbool_and (va_codegen_success_Loop ()) (va_pbool_and (va_codegen_success_Epilogue ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Sha_update (va_mods:va_mods_t) (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 667 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Preamble ctx_b) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 668 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop in_b k_b) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 669 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Epilogue ctx_b) (va_QEmpty (())))))) val va_lemma_Sha_update : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Sha_update ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))))))))))))))) [@"opaque_to_smt"] let va_lemma_Sha_update va_b0 va_s0 ctx_b in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Sha_update va_mods ctx_b in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Sha_update ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 627 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 653 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 662 column 103 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 665 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Sha_update (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_mem:vale_heap) (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_heap0:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi (va_upd_mem va_x_mem va_s0)))))))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) ==> va_k va_sM (()))) val va_wpProof_Sha_update : ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Sha_update ctx_b in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Sha_update ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Sha_update ctx_b in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Sha_update (va_code_Sha_update ()) va_s0 ctx_b in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Sha_update (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update ())) = (va_QProc (va_code_Sha_update ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) (va_wp_Sha_update ctx_b in_b k_b) (va_wpProof_Sha_update ctx_b in_b k_b)) //-- //-- Sha_update_bytes #push-options "--z3rlimit 80" #restart-solver val va_code_Sha_update_bytes : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Sha_update_bytes () = (va_Block (va_CCons (va_code_Sha_update ()) (va_CCons (va_Block (va_CNil ())) (va_CNil ())))) val va_codegen_success_Sha_update_bytes : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Sha_update_bytes () = (va_pbool_and (va_codegen_success_Sha_update ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Sha_update_bytes (va_mods:va_mods_t) (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update_bytes ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 714 column 15 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sha_update ctx_b in_b k_b) (fun (va_s:va_state) _ -> let (old_ctx:(seq (four nat32))) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_old_s) ctx_b in let (new_ctx:(seq (four nat32))) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) ctx_b in let (va_arg34:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = old_ctx in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 717 column 24 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_hash_to_bytes va_arg34) (let (va_arg33:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = new_ctx in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 718 column 24 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_hash_to_bytes va_arg33) (let (hash_in:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes old_ctx) in let (hash_out:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes new_ctx) in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 728 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_old_s)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_old_s) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 730 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (hash_out == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_in) (let (va_arg32:(FStar.Seq.Base.seq Vale.SHA.SHA_helpers.byte)) = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes input_LE) in let (va_arg31:(FStar.Seq.Base.seq Vale.Def.Words_s.nat8)) = Vale.Def.Types_s.le_seq_quad32_to_bytes input_LE in let (va_arg30:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = input_LE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 731 column 34 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_equiv_vale hash_in hash_out va_arg30 input_BE va_arg31 va_arg32) (va_QEmpty (()))))))))) val va_lemma_Sha_update_bytes : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Sha_update_bytes ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 ctx_b == 2 /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 in_b == 4 `op_Multiply` va_get_reg64 rRdx va_s0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let hash_in = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) ctx_b)) in let hash_out = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) ctx_b)) in (let input_LE = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b)) in l_and (FStar.Seq.Base.length #FStar.UInt8.t input_LE `op_Modulus` 64 == 0) (hash_out == Vale.SHA.SHA_helpers.update_multi_opaque_vale hash_in input_LE)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))))))))))))))) [@"opaque_to_smt"] let va_lemma_Sha_update_bytes va_b0 va_s0 ctx_b in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Sha_update_bytes va_mods ctx_b in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Sha_update_bytes ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 672 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 702 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 704 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_in = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) ctx_b)) in label va_range1 "***** POSTCONDITION NOT MET AT line 705 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_out = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) ctx_b)) in label va_range1 "***** POSTCONDITION NOT MET AT line 709 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b)) in l_and (FStar.Seq.Base.length #FStar.UInt8.t input_LE `op_Modulus` 64 == 0) (hash_out == Vale.SHA.SHA_helpers.update_multi_opaque_vale hash_in input_LE)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 712 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Sha_update_bytes (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 ctx_b == 2 /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 in_b == 4 `op_Multiply` va_get_reg64 rRdx va_s0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_mem:vale_heap) (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_heap0:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi (va_upd_mem va_x_mem va_s0)))))))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let hash_in = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) ctx_b)) in let hash_out = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) ctx_b)) in (let input_LE = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b)) in l_and (FStar.Seq.Base.length #FStar.UInt8.t input_LE `op_Modulus` 64 == 0) (hash_out == Vale.SHA.SHA_helpers.update_multi_opaque_vale hash_in input_LE)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM))) ==> va_k va_sM (()))) val va_wpProof_Sha_update_bytes : ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Sha_update_bytes ctx_b in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Sha_update_bytes ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Sha_update_bytes ctx_b in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Sha_update_bytes (va_code_Sha_update_bytes ()) va_s0 ctx_b in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Sha_update_bytes (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 80, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_quick_Sha_update_bytes (ctx_b in_b k_b: buffer128) : (va_quickCode unit (va_code_Sha_update_bytes ()))
[]
Vale.SHA.X64.va_quick_Sha_update_bytes
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
ctx_b: Vale.X64.Memory.buffer128 -> in_b: Vale.X64.Memory.buffer128 -> k_b: Vale.X64.Memory.buffer128 -> Vale.X64.QuickCode.va_quickCode Prims.unit (Vale.SHA.X64.va_code_Sha_update_bytes ())
{ "end_col": 14, "end_line": 2516, "start_col": 2, "start_line": 2512 }
Prims.Ghost
val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g))))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k =
false
null
false
let va_sM, va_f0 = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))) ))))))); va_lemma_norm_mods ([ va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx ]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[]
[ "Vale.X64.Memory.buffer128", "Vale.SHA.SHA_helpers.block_w", "Vale.X64.Decls.va_state", "Prims.unit", "Vale.X64.Decls.va_fuel", "FStar.Pervasives.Native.Mktuple3", "Vale.X64.QuickCode.va_lemma_norm_mods", "Prims.Cons", "Vale.X64.QuickCode.mod_t", "Vale.X64.QuickCode.va_Mod_flags", "Vale.X64.QuickCode.va_Mod_xmm", "Vale.X64.QuickCode.va_Mod_reg64", "Vale.X64.Machine_s.rRdx", "Prims.Nil", "Prims._assert", "Vale.X64.Decls.va_state_eq", "Vale.X64.Decls.va_update_flags", "Vale.X64.Decls.va_update_xmm", "Vale.X64.Decls.va_update_reg64", "Vale.X64.Decls.va_update_ok", "Vale.X64.Decls.va_lemma_upd_update", "FStar.Pervasives.Native.tuple3", "FStar.Pervasives.Native.tuple2", "Vale.X64.State.vale_state", "Vale.SHA.X64.va_lemma_Loop_rounds_52_64", "Vale.SHA.X64.va_code_Loop_rounds_52_64" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g))))
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g))))
[]
Vale.SHA.X64.va_wpProof_Loop_rounds_52_64
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
k_b: Vale.X64.Memory.buffer128 -> block: Vale.SHA.SHA_helpers.block_w -> va_s0: Vale.X64.Decls.va_state -> va_k: (_: Vale.X64.Decls.va_state -> _: Prims.unit -> Type0) -> Prims.Ghost ((Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel) * Prims.unit)
{ "end_col": 22, "end_line": 1304, "start_col": 55, "start_line": 1294 }
Prims.Ghost
val va_wpProof_Loop : in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g))))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_wpProof_Loop in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop (va_code_Loop ()) va_s0 in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
val va_wpProof_Loop : in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) let va_wpProof_Loop in_b k_b va_s0 va_k =
false
null
false
let va_sM, va_f0 = va_lemma_Loop (va_code_Loop ()) va_s0 in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([ va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi ]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[]
[ "Vale.X64.Memory.buffer128", "Vale.X64.Decls.va_state", "Prims.unit", "Vale.X64.Decls.va_fuel", "FStar.Pervasives.Native.Mktuple3", "Vale.X64.QuickCode.va_lemma_norm_mods", "Prims.Cons", "Vale.X64.QuickCode.mod_t", "Vale.X64.QuickCode.va_Mod_flags", "Vale.X64.QuickCode.va_Mod_xmm", "Vale.X64.QuickCode.va_Mod_reg64", "Vale.X64.Machine_s.rRdx", "Vale.X64.Machine_s.rRsi", "Prims.Nil", "Prims._assert", "Vale.X64.Decls.va_state_eq", "Vale.X64.Decls.va_update_flags", "Vale.X64.Decls.va_update_xmm", "Vale.X64.Decls.va_update_reg64", "Vale.X64.Decls.va_update_ok", "Vale.X64.Decls.va_lemma_upd_update", "FStar.Pervasives.Native.tuple3", "FStar.Pervasives.Native.tuple2", "Vale.X64.State.vale_state", "Vale.SHA.X64.va_lemma_Loop", "Vale.SHA.X64.va_code_Loop" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ()))) val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_body0 () = (va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_body0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 578 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds in_b k_b (count `op_Multiply` 4) hash_orig) (fun (va_s:va_state) _ -> let (count:nat) = count + 1 in va_QEmpty ((count))))) val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_body0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_body0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_body0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 576 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0 /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_body0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_body0 (va_code_Loop_body0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_body0 ())) = (va_QProc (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop_while0 val va_code_Loop_while0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_while0 () = (va_Block (va_CCons (va_While (va_cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (va_Block (va_CCons (va_code_Loop_body0 ()) (va_CNil ())))) (va_CNil ()))) val va_codegen_success_Loop_while0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_while0 () = (va_pbool_and (va_codegen_success_Loop_body0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_while0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_while0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qWhile va_mods (Cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (fun va_g -> let (count:nat) = let count = va_g in count in qblock va_mods (fun (va_s:va_state) -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_body0 va_old hash_orig in_b k_b count) (fun (va_s:va_state) (count:nat) -> va_QEmpty ((count))))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_ok va_s /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRsi va_old) in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRcx va_s) k_b 16 (va_get_mem_layout va_s) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_s == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_reg64 rRdx va_s) ((count))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in let va_g = (count) in let (count:nat) = va_g in va_QEmpty ((count))))) val va_lemma_Loop_while0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_while0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig))) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_while0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_while0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_while0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~(va_get_reg64 rRdx va_sM > 0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_while0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_while0 (va_code_Loop_while0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_while0 ())) = (va_QProc (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop val va_code_Loop : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop () = (va_Block (va_CCons (va_code_Loop_while0 ()) (va_CNil ()))) val va_codegen_success_Loop : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop () = (va_pbool_and (va_codegen_success_Loop_while0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (count:nat) = 0 in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 556 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_while0 va_old_s hash_orig in_b k_b count) (fun (va_s:va_state) count -> va_QEmpty (())))) val va_lemma_Loop : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop va_b0 va_s0 in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop va_mods in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 547 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 548 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == 0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 551 column 90 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) ==> va_k va_sM (()))) val va_wpProof_Loop : in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g))))
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_wpProof_Loop : in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g))))
[]
Vale.SHA.X64.va_wpProof_Loop
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
in_b: Vale.X64.Memory.buffer128 -> k_b: Vale.X64.Memory.buffer128 -> va_s0: Vale.X64.Decls.va_state -> va_k: (_: Vale.X64.Decls.va_state -> _: Prims.unit -> Type0) -> Prims.Ghost ((Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel) * Prims.unit)
{ "end_col": 22, "end_line": 2020, "start_col": 41, "start_line": 2008 }
Prims.Ghost
val va_wpProof_Loop_while0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g))))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_while0 (va_code_Loop_while0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g)
val va_wpProof_Loop_while0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) let va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k =
false
null
false
let va_sM, va_f0, count = va_lemma_Loop_while0 (va_code_Loop_while0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))) ); va_lemma_norm_mods ([ va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags ]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g)
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[]
[ "Vale.X64.Decls.va_state", "Vale.SHA.SHA_helpers.hash256", "Vale.X64.Memory.buffer128", "Prims.nat", "Vale.X64.Decls.va_fuel", "FStar.Pervasives.Native.Mktuple3", "Prims.unit", "Vale.X64.QuickCode.va_lemma_norm_mods", "Prims.Cons", "Vale.X64.QuickCode.mod_t", "Vale.X64.QuickCode.va_Mod_xmm", "Vale.X64.QuickCode.va_Mod_reg64", "Vale.X64.Machine_s.rRsi", "Vale.X64.Machine_s.rRdx", "Vale.X64.QuickCode.va_Mod_ok", "Vale.X64.QuickCode.va_Mod_flags", "Prims.Nil", "Prims._assert", "Vale.X64.Decls.va_state_eq", "Vale.X64.Decls.va_update_xmm", "Vale.X64.Decls.va_update_reg64", "Vale.X64.Decls.va_update_ok", "Vale.X64.Decls.va_update_flags", "Vale.X64.Decls.va_lemma_upd_update", "FStar.Pervasives.Native.tuple3", "Vale.X64.State.vale_state", "Vale.SHA.X64.va_lemma_Loop_while0", "Vale.SHA.X64.va_code_Loop_while0" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ()))) val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_body0 () = (va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_body0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 578 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds in_b k_b (count `op_Multiply` 4) hash_orig) (fun (va_s:va_state) _ -> let (count:nat) = count + 1 in va_QEmpty ((count))))) val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_body0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_body0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_body0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 576 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0 /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_body0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_body0 (va_code_Loop_body0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_body0 ())) = (va_QProc (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop_while0 val va_code_Loop_while0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_while0 () = (va_Block (va_CCons (va_While (va_cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (va_Block (va_CCons (va_code_Loop_body0 ()) (va_CNil ())))) (va_CNil ()))) val va_codegen_success_Loop_while0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_while0 () = (va_pbool_and (va_codegen_success_Loop_body0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_while0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_while0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qWhile va_mods (Cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (fun va_g -> let (count:nat) = let count = va_g in count in qblock va_mods (fun (va_s:va_state) -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_body0 va_old hash_orig in_b k_b count) (fun (va_s:va_state) (count:nat) -> va_QEmpty ((count))))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_ok va_s /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRsi va_old) in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRcx va_s) k_b 16 (va_get_mem_layout va_s) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_s == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_reg64 rRdx va_s) ((count))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in let va_g = (count) in let (count:nat) = va_g in va_QEmpty ((count))))) val va_lemma_Loop_while0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_while0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig))) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_while0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_while0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_while0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~(va_get_reg64 rRdx va_sM > 0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_while0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g))))
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_wpProof_Loop_while0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g))))
[]
Vale.SHA.X64.va_wpProof_Loop_while0
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_old: Vale.X64.Decls.va_state -> va_in_hash_orig: Vale.SHA.SHA_helpers.hash256 -> va_in_in_b: Vale.X64.Memory.buffer128 -> va_in_k_b: Vale.X64.Memory.buffer128 -> va_in_count: Prims.nat -> va_s0: Vale.X64.Decls.va_state -> va_k: (_: Vale.X64.Decls.va_state -> _: Prims.nat -> Type0) -> Prims.Ghost ((Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel) * Prims.nat)
{ "end_col": 22, "end_line": 1888, "start_col": 95, "start_line": 1875 }
Prims.Tot
val va_qcode_Loop_rounds_52_64 (va_mods: va_mods_t) (k_b: buffer128) (block: block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ()))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (()))))))))))))))))))))))))))))))))))
val va_qcode_Loop_rounds_52_64 (va_mods: va_mods_t) (k_b: buffer128) (block: block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) let va_qcode_Loop_rounds_52_64 (va_mods: va_mods_t) (k_b: buffer128) (block: block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) =
false
null
false
(qblock va_mods (fun (va_s: va_state) -> let va_old_s:va_state = va_s in let hash_orig:Vale.SHA.SHA_helpers.hash256 = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s: va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337: (FStar.Seq.Base.seq a_336)) (i_338: Prims.nat) -> let i_312:Prims.nat = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3) ) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s: va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337: (FStar.Seq.Base.seq a_336)) (i_338: Prims.nat) -> let i_312:Prims.nat = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1) ) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8) ) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1 ) (va_op_xmm_xmm 2 ) (4 `op_Multiply` 14 + 2 ) block hash_orig ) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer ( va_op_heaplet_mem_heaplet 0 ) ( va_op_xmm_xmm 0 ) ( va_op_reg_opr64_reg64 rRcx ) ( 16 `op_Multiply` 15 ) Secret k_b 15 ) (fun ( va_s: va_state ) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( ( fun a_336 ( s_337: ( FStar.Seq.Base.seq a_336 ) ) ( i_338: Prims.nat ) -> let i_312:Prims.nat = i_338 in Prims.b2t ( Prims.op_LessThan i_312 ( FStar.Seq.Base.length #a_336 s_337 ) ) ) Vale.X64.Decls.quad32 ks 15 ) ( fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15 ) ( va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_quick_Paddd ( va_op_xmm_xmm 0 ) ( va_op_xmm_xmm 5 ) ) ( va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_quick_SHA256_rnds2 ( va_op_xmm_xmm 2 ) ( va_op_xmm_xmm 1 ) ( 4 `op_Multiply` 15 ) block hash_orig ) ( va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_quick_Pshufd ( va_op_xmm_xmm 0 ) ( va_op_xmm_xmm 0 ) 14 ) ( va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_quick_Sub64 ( va_op_dst_opr64_reg64 rRdx ) ( va_const_opr64 1 ) ) ( va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_quick_SHA256_rnds2 ( va_op_xmm_xmm 1 ) ( va_op_xmm_xmm 2 ) ( 4 `op_Multiply` 15 + 2 ) block hash_orig ) ( fun ( va_s: va_state ) _ -> let abef_shuffle:quad32 = va_get_xmm 1 va_s in let cdgh_shuffle:quad32 = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_quick_Paddd ( va_op_xmm_xmm 2 ) ( va_op_xmm_xmm 10 ) ) ( va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_quick_Paddd ( va_op_xmm_xmm 1 ) ( va_op_xmm_xmm 9 ) ) ( fun ( va_s: va_state ) _ -> let va_arg56:Vale.SHA.SHA_helpers.block_w = block in let va_arg55:Vale.Def.Types_s.quad32 = va_get_xmm 10 va_s in let va_arg54:Vale.Def.Types_s.quad32 = va_get_xmm 9 va_s in let va_arg53:Vale.Def.Types_s.quad32 = va_get_xmm 2 va_s in let va_arg52:Vale.Def.Types_s.quad32 = va_get_xmm 1 va_s in let va_arg51:Vale.Def.Types_s.quad32 = cdgh_shuffle in let va_arg50:Vale.Def.Types_s.quad32 = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( fun ( _: unit ) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56 ) ( va_QEmpty ( () ) ) ) ) ) ) ) ) ) ) ) )) )))))))))) )))))))))))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Vale.X64.QuickCode.va_mods_t", "Vale.X64.Memory.buffer128", "Vale.SHA.SHA_helpers.block_w", "Vale.X64.QuickCodes.qblock", "Prims.unit", "Prims.Cons", "Vale.X64.Decls.va_code", "Vale.X64.InsVector.va_code_Load128_buffer", "Vale.X64.Decls.va_op_heaplet_mem_heaplet", "Vale.X64.Decls.va_op_xmm_xmm", "Vale.X64.Decls.va_op_reg_opr64_reg64", "Vale.X64.Machine_s.rRcx", "Prims.op_Multiply", "Vale.Arch.HeapTypes_s.Secret", "Vale.X64.Machine_s.Block", "Vale.X64.Decls.ins", "Vale.X64.Decls.ocmp", "Prims.Nil", "Vale.X64.Machine_s.precode", "Vale.X64.InsVector.va_code_Paddd", "Vale.X64.InsSha.va_code_SHA256_msg2", "Vale.X64.InsSha.va_code_SHA256_rnds2", "Vale.X64.InsVector.va_code_Pshufd", "Vale.X64.InsVector.va_code_Mov128", "Vale.X64.InsVector.va_code_Palignr4", "Vale.X64.InsBasic.va_code_Sub64", "Vale.X64.Decls.va_op_dst_opr64_reg64", "Vale.X64.Machine_s.rRdx", "Vale.X64.Decls.va_const_opr64", "Vale.X64.Decls.va_state", "Vale.X64.QuickCodes.va_QBind", "Vale.X64.QuickCodes.va_range1", "Vale.X64.InsVector.va_quick_Load128_buffer", "Vale.X64.QuickCodes.va_qAssertSquash", "Prims.b2t", "Prims.op_LessThan", "FStar.Seq.Base.length", "Vale.X64.Decls.quad32", "Prims.nat", "Prims.squash", "Vale.X64.QuickCodes.va_qAssert", "Prims.eq2", "Vale.X64.Decls.va_get_xmm", "FStar.Seq.Base.index", "Vale.X64.QuickCodes.va_QSeq", "Vale.X64.InsVector.va_quick_Paddd", "Vale.X64.InsSha.va_quick_SHA256_msg2", "Prims.op_Addition", "Vale.X64.InsSha.va_quick_SHA256_rnds2", "Vale.X64.InsVector.va_quick_Pshufd", "Vale.X64.InsVector.va_quick_Mov128", "Vale.X64.InsVector.va_quick_Palignr4", "Vale.X64.InsBasic.va_quick_Sub64", "Vale.X64.QuickCodes.va_qPURE", "Prims.pure_post", "Prims.l_and", "Vale.SHA.SHA_helpers.hash256", "Vale.SHA.SHA_helpers.make_hash", "Spec.Loops.repeat_range", "Vale.SHA.SHA_helpers.shuffle_core_opaque", "Vale.Def.Types_s.quad32", "Vale.Arch.Types.add_wrap_quad32", "Prims.l_Forall", "Prims.l_imp", "Vale.SHA.SHA_helpers.update_block", "Vale.SHA.SHA_helpers.update_lemma", "Vale.X64.QuickCodes.va_QEmpty", "Vale.X64.QuickCodes.quickCodes", "FStar.Seq.Base.seq", "Vale.X64.Decls.buffer128_as_seq", "Vale.X64.Decls.va_get_mem_heaplet", "Vale.X64.State.vale_state", "Vale.X64.QuickCode.va_quickCode", "Vale.SHA.X64.va_code_Loop_rounds_52_64" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_qcode_Loop_rounds_52_64 (va_mods: va_mods_t) (k_b: buffer128) (block: block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ()))
[]
Vale.SHA.X64.va_qcode_Loop_rounds_52_64
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_mods: Vale.X64.QuickCode.va_mods_t -> k_b: Vale.X64.Memory.buffer128 -> block: Vale.SHA.SHA_helpers.block_w -> Vale.X64.QuickCode.va_quickCode Prims.unit (Vale.SHA.X64.va_code_Loop_rounds_52_64 ())
{ "end_col": 71, "end_line": 1213, "start_col": 2, "start_line": 1123 }
Prims.Tot
val va_wp_Sha_update (ctx_b in_b k_b: buffer128) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_wp_Sha_update (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_mem:vale_heap) (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_heap0:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi (va_upd_mem va_x_mem va_s0)))))))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) ==> va_k va_sM (())))
val va_wp_Sha_update (ctx_b in_b k_b: buffer128) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0 let va_wp_Sha_update (ctx_b in_b k_b: buffer128) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0 =
false
null
false
(va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` (va_get_reg64 rRdx va_s0)) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` (va_get_reg64 rRdx va_s0) < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_mem: vale_heap) (va_x_rsi: nat64) (va_x_rdx: nat64) (va_x_rax: nat64) (va_x_xmm0: quad32) (va_x_xmm1: quad32) (va_x_xmm2: quad32) (va_x_xmm3: quad32) (va_x_xmm4: quad32) (va_x_xmm5: quad32) (va_x_xmm6: quad32) (va_x_xmm7: quad32) (va_x_xmm8: quad32) (va_x_xmm9: quad32) (va_x_xmm10: quad32) (va_x_heap0: vale_heap) (va_x_efl: Vale.X64.Flags.t). let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi (va_upd_mem va_x_mem va_s0)))) )))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` (va_get_reg64 rRdx va_s0) /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` (va_get_reg64 rRdx va_s0)) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) ==> va_k va_sM (())))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Vale.X64.Memory.buffer128", "Vale.X64.Decls.va_state", "Prims.unit", "Prims.l_and", "Prims.b2t", "Vale.X64.Decls.va_get_ok", "Vale.X64.CPU_Features_s.sha_enabled", "Vale.X64.CPU_Features_s.sse_enabled", "Vale.X64.Decls.validSrcAddrs128", "Vale.X64.Decls.va_get_mem_heaplet", "Vale.X64.Decls.va_get_reg64", "Vale.X64.Machine_s.rRsi", "Prims.op_Multiply", "Vale.X64.Machine_s.rRdx", "Vale.X64.Decls.va_get_mem_layout", "Vale.Arch.HeapTypes_s.Secret", "Vale.X64.Decls.validDstAddrs128", "Vale.X64.Machine_s.rRdi", "Vale.X64.Machine_s.rRcx", "Prims.op_LessThan", "Prims.op_Addition", "Vale.X64.Machine_s.pow2_64", "Vale.X64.Decls.buffers_disjoint128", "Vale.SHA.SHA_helpers.k_reqs", "Vale.X64.Decls.buffer128_as_seq", "Prims.l_Forall", "Vale.X64.InsBasic.vale_heap", "Vale.X64.Memory.nat64", "Vale.X64.Decls.quad32", "Vale.X64.Flags.t", "Prims.l_imp", "Prims.eq2", "Prims.int", "Vale.SHA.SHA_helpers.hash256", "Vale.SHA.SHA_helpers.make_ordered_hash", "Vale.SHA.SHA_helpers.update_multi_quads", "FStar.Seq.Base.seq", "Vale.Def.Types_s.quad32", "Vale.Arch.Types.reverse_bytes_nat32_quad32_seq", "FStar.Seq.Base.slice", "Vale.X64.Decls.buffer128_read", "Vale.X64.Decls.modifies_buffer128", "Vale.X64.State.vale_state", "Vale.X64.Decls.va_upd_flags", "Vale.X64.Decls.va_upd_mem_heaplet", "Vale.X64.Decls.va_upd_xmm", "Vale.X64.Decls.va_upd_reg64", "Vale.X64.Machine_s.rRax", "Vale.X64.Decls.va_upd_mem" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ()))) val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_body0 () = (va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_body0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 578 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds in_b k_b (count `op_Multiply` 4) hash_orig) (fun (va_s:va_state) _ -> let (count:nat) = count + 1 in va_QEmpty ((count))))) val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_body0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_body0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_body0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 576 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0 /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_body0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_body0 (va_code_Loop_body0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_body0 ())) = (va_QProc (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop_while0 val va_code_Loop_while0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_while0 () = (va_Block (va_CCons (va_While (va_cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (va_Block (va_CCons (va_code_Loop_body0 ()) (va_CNil ())))) (va_CNil ()))) val va_codegen_success_Loop_while0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_while0 () = (va_pbool_and (va_codegen_success_Loop_body0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_while0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_while0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qWhile va_mods (Cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (fun va_g -> let (count:nat) = let count = va_g in count in qblock va_mods (fun (va_s:va_state) -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_body0 va_old hash_orig in_b k_b count) (fun (va_s:va_state) (count:nat) -> va_QEmpty ((count))))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_ok va_s /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRsi va_old) in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRcx va_s) k_b 16 (va_get_mem_layout va_s) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_s == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_reg64 rRdx va_s) ((count))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in let va_g = (count) in let (count:nat) = va_g in va_QEmpty ((count))))) val va_lemma_Loop_while0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_while0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig))) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_while0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_while0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_while0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~(va_get_reg64 rRdx va_sM > 0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_while0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_while0 (va_code_Loop_while0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_while0 ())) = (va_QProc (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop val va_code_Loop : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop () = (va_Block (va_CCons (va_code_Loop_while0 ()) (va_CNil ()))) val va_codegen_success_Loop : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop () = (va_pbool_and (va_codegen_success_Loop_while0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (count:nat) = 0 in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 556 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_while0 va_old_s hash_orig in_b k_b count) (fun (va_s:va_state) count -> va_QEmpty (())))) val va_lemma_Loop : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop va_b0 va_s0 in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop va_mods in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 547 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 548 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == 0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 551 column 90 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) ==> va_k va_sM (()))) val va_wpProof_Loop : in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop (va_code_Loop ()) va_s0 in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (va_QProc (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop in_b k_b) (va_wpProof_Loop in_b k_b)) //-- //-- Epilogue val va_code_Epilogue : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Epilogue () = (va_Block (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_CNil ()))))))))) val va_codegen_success_Epilogue : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Epilogue () = (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_ttrue ())))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Epilogue (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Epilogue ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 612 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 613 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 614 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 616 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 617 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 619 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret ctx_b 0) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 620 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret ctx_b 1) (fun (va_s:va_state) _ -> let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 623 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_old_s) (va_get_xmm 2 va_old_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))) val va_lemma_Epilogue : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Epilogue ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Epilogue va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Epilogue va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Epilogue ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 583 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 603 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 606 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Epilogue (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_mem:vale_heap) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_heap0:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_mem va_x_mem va_s0))))) in va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) ==> va_k va_sM (()))) val va_wpProof_Epilogue : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Epilogue ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Epilogue ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Epilogue ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Epilogue (va_code_Epilogue ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Epilogue (ctx_b:buffer128) : (va_quickCode unit (va_code_Epilogue ())) = (va_QProc (va_code_Epilogue ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) (va_wp_Epilogue ctx_b) (va_wpProof_Epilogue ctx_b)) //-- //-- Sha_update val va_code_Sha_update : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Sha_update () = (va_Block (va_CCons (va_code_Preamble ()) (va_CCons (va_code_Loop ()) (va_CCons (va_code_Epilogue ()) (va_CNil ()))))) val va_codegen_success_Sha_update : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Sha_update () = (va_pbool_and (va_codegen_success_Preamble ()) (va_pbool_and (va_codegen_success_Loop ()) (va_pbool_and (va_codegen_success_Epilogue ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Sha_update (va_mods:va_mods_t) (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 667 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Preamble ctx_b) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 668 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop in_b k_b) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 669 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Epilogue ctx_b) (va_QEmpty (())))))) val va_lemma_Sha_update : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Sha_update ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))))))))))))))) [@"opaque_to_smt"] let va_lemma_Sha_update va_b0 va_s0 ctx_b in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Sha_update va_mods ctx_b in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Sha_update ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 627 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 653 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 662 column 103 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 665 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Sha_update (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) (va_s0:va_state)
false
true
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_wp_Sha_update (ctx_b in_b k_b: buffer128) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0
[]
Vale.SHA.X64.va_wp_Sha_update
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
ctx_b: Vale.X64.Memory.buffer128 -> in_b: Vale.X64.Memory.buffer128 -> k_b: Vale.X64.Memory.buffer128 -> va_s0: Vale.X64.Decls.va_state -> va_k: (_: Vale.X64.Decls.va_state -> _: Prims.unit -> Type0) -> Type0
{ "end_col": 33, "end_line": 2289, "start_col": 2, "start_line": 2261 }
Prims.Tot
val va_code_Loop : va_dummy:unit -> Tot va_code
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_code_Loop () = (va_Block (va_CCons (va_code_Loop_while0 ()) (va_CNil ())))
val va_code_Loop : va_dummy:unit -> Tot va_code let va_code_Loop () =
false
null
false
(va_Block (va_CCons (va_code_Loop_while0 ()) (va_CNil ())))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Prims.unit", "Vale.X64.Decls.va_Block", "Vale.X64.Decls.va_CCons", "Vale.SHA.X64.va_code_Loop_while0", "Vale.X64.Decls.va_CNil", "Vale.X64.Decls.va_code" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ()))) val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_body0 () = (va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_body0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 578 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds in_b k_b (count `op_Multiply` 4) hash_orig) (fun (va_s:va_state) _ -> let (count:nat) = count + 1 in va_QEmpty ((count))))) val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_body0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_body0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_body0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 576 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0 /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_body0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_body0 (va_code_Loop_body0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_body0 ())) = (va_QProc (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop_while0 val va_code_Loop_while0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_while0 () = (va_Block (va_CCons (va_While (va_cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (va_Block (va_CCons (va_code_Loop_body0 ()) (va_CNil ())))) (va_CNil ()))) val va_codegen_success_Loop_while0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_while0 () = (va_pbool_and (va_codegen_success_Loop_body0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_while0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_while0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qWhile va_mods (Cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (fun va_g -> let (count:nat) = let count = va_g in count in qblock va_mods (fun (va_s:va_state) -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_body0 va_old hash_orig in_b k_b count) (fun (va_s:va_state) (count:nat) -> va_QEmpty ((count))))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_ok va_s /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRsi va_old) in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRcx va_s) k_b 16 (va_get_mem_layout va_s) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_s == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_reg64 rRdx va_s) ((count))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in let va_g = (count) in let (count:nat) = va_g in va_QEmpty ((count))))) val va_lemma_Loop_while0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_while0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig))) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_while0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_while0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_while0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~(va_get_reg64 rRdx va_sM > 0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_while0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_while0 (va_code_Loop_while0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_while0 ())) = (va_QProc (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop val va_code_Loop : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr]
false
true
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_code_Loop : va_dummy:unit -> Tot va_code
[]
Vale.SHA.X64.va_code_Loop
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_dummy: Prims.unit -> Vale.X64.Decls.va_code
{ "end_col": 61, "end_line": 1904, "start_col": 2, "start_line": 1904 }
Prims.Tot
val va_wp_Loop_while0 (va_old: va_state) (va_in_hash_orig: hash256) (va_in_in_b va_in_k_b: buffer128) (va_in_count: nat) (va_s0: va_state) (va_k: (va_state -> nat -> Type0)) : Type0
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_wp_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) ==> va_k va_sM ((count))))
val va_wp_Loop_while0 (va_old: va_state) (va_in_hash_orig: hash256) (va_in_in_b va_in_k_b: buffer128) (va_in_count: nat) (va_s0: va_state) (va_k: (va_state -> nat -> Type0)) : Type0 let va_wp_Loop_while0 (va_old: va_state) (va_in_hash_orig: hash256) (va_in_in_b va_in_k_b: buffer128) (va_in_count: nat) (va_s0: va_state) (va_k: (va_state -> nat -> Type0)) : Type0 =
false
null
false
(va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` (va_get_reg64 rRdx va_old)) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` (va_get_reg64 rRdx va_old) < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ (forall (va_x_efl: Vale.X64.Flags.t) (va_x_ok: bool) (va_x_rdx: nat64) (va_x_rsi: nat64) (va_x_xmm0: quad32) (va_x_xmm1: quad32) (va_x_xmm10: quad32) (va_x_xmm2: quad32) (va_x_xmm3: quad32) (va_x_xmm4: quad32) (va_x_xmm5: quad32) (va_x_xmm6: quad32) (va_x_xmm7: quad32) (va_x_xmm9: quad32) (count: nat). let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` (va_get_reg64 rRdx va_old)) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` (va_get_reg64 rRdx va_old) < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) ==> va_k va_sM ((count))))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Vale.X64.Decls.va_state", "Vale.SHA.SHA_helpers.hash256", "Vale.X64.Memory.buffer128", "Prims.nat", "Prims.l_and", "Prims.b2t", "Vale.X64.Decls.va_get_ok", "Vale.X64.CPU_Features_s.sha_enabled", "Vale.X64.CPU_Features_s.sse_enabled", "Vale.X64.Decls.validSrcAddrs128", "Vale.X64.Decls.va_get_mem_heaplet", "Vale.X64.Decls.va_get_reg64", "Vale.X64.Machine_s.rRsi", "Prims.op_Multiply", "Vale.X64.Machine_s.rRdx", "Vale.X64.Decls.va_get_mem_layout", "Vale.Arch.HeapTypes_s.Secret", "Vale.X64.Machine_s.rRcx", "Prims.op_LessThan", "Prims.op_Addition", "Vale.X64.Machine_s.pow2_64", "Prims.eq2", "Prims.int", "Prims.op_Subtraction", "Vale.Def.Words_s.four", "Vale.Def.Types_s.nat32", "Vale.X64.Decls.va_get_xmm", "Vale.Def.Words_s.Mkfour", "Vale.SHA.SHA_helpers.k_reqs", "Vale.X64.Decls.buffer128_as_seq", "Vale.SHA.SHA_helpers.make_hash", "Vale.SHA.SHA_helpers.update_multi_quads", "FStar.Seq.Base.seq", "Vale.Def.Types_s.quad32", "Vale.Arch.Types.reverse_bytes_nat32_quad32_seq", "FStar.Seq.Base.slice", "Vale.X64.Decls.quad32", "Prims.l_Forall", "Vale.X64.Flags.t", "Prims.bool", "Vale.X64.Memory.nat64", "Prims.l_imp", "Prims.l_not", "Prims.op_GreaterThan", "Vale.X64.State.vale_state", "Vale.X64.Decls.va_upd_xmm", "Vale.X64.Decls.va_upd_reg64", "Vale.X64.Decls.va_upd_ok", "Vale.X64.Decls.va_upd_flags" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ()))) val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_body0 () = (va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_body0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 578 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds in_b k_b (count `op_Multiply` 4) hash_orig) (fun (va_s:va_state) _ -> let (count:nat) = count + 1 in va_QEmpty ((count))))) val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_body0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_body0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_body0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 576 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0 /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_body0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_body0 (va_code_Loop_body0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_body0 ())) = (va_QProc (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop_while0 val va_code_Loop_while0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_while0 () = (va_Block (va_CCons (va_While (va_cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (va_Block (va_CCons (va_code_Loop_body0 ()) (va_CNil ())))) (va_CNil ()))) val va_codegen_success_Loop_while0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_while0 () = (va_pbool_and (va_codegen_success_Loop_body0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_while0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_while0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qWhile va_mods (Cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (fun va_g -> let (count:nat) = let count = va_g in count in qblock va_mods (fun (va_s:va_state) -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_body0 va_old hash_orig in_b k_b count) (fun (va_s:va_state) (count:nat) -> va_QEmpty ((count))))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_ok va_s /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRsi va_old) in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRcx va_s) k_b 16 (va_get_mem_layout va_s) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_s == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_reg64 rRdx va_s) ((count))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in let va_g = (count) in let (count:nat) = va_g in va_QEmpty ((count))))) val va_lemma_Loop_while0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_while0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig))) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_while0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_while0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_while0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~(va_get_reg64 rRdx va_sM > 0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) :
false
true
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_wp_Loop_while0 (va_old: va_state) (va_in_hash_orig: hash256) (va_in_in_b va_in_k_b: buffer128) (va_in_count: nat) (va_s0: va_state) (va_k: (va_state -> nat -> Type0)) : Type0
[]
Vale.SHA.X64.va_wp_Loop_while0
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_old: Vale.X64.Decls.va_state -> va_in_hash_orig: Vale.SHA.SHA_helpers.hash256 -> va_in_in_b: Vale.X64.Memory.buffer128 -> va_in_k_b: Vale.X64.Memory.buffer128 -> va_in_count: Prims.nat -> va_s0: Vale.X64.Decls.va_state -> va_k: (_: Vale.X64.Decls.va_state -> _: Prims.nat -> Type0) -> Type0
{ "end_col": 35, "end_line": 1862, "start_col": 2, "start_line": 1825 }
Prims.Tot
val va_wp_Loop_body0 (va_old: va_state) (va_in_hash_orig: hash256) (va_in_in_b va_in_k_b: buffer128) (va_in_count: nat) (va_s0: va_state) (va_k: (va_state -> nat -> Type0)) : Type0
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_wp_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0 /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) ==> va_k va_sM ((count))))
val va_wp_Loop_body0 (va_old: va_state) (va_in_hash_orig: hash256) (va_in_in_b va_in_k_b: buffer128) (va_in_count: nat) (va_s0: va_state) (va_k: (va_state -> nat -> Type0)) : Type0 let va_wp_Loop_body0 (va_old: va_state) (va_in_hash_orig: hash256) (va_in_in_b va_in_k_b: buffer128) (va_in_count: nat) (va_s0: va_state) (va_k: (va_state -> nat -> Type0)) : Type0 =
false
null
false
(va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` (va_get_reg64 rRdx va_old)) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` (va_get_reg64 rRdx va_old) < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0 /\ (forall (va_x_efl: Vale.X64.Flags.t) (va_x_ok: bool) (va_x_rdx: nat64) (va_x_rsi: nat64) (va_x_xmm0: quad32) (va_x_xmm1: quad32) (va_x_xmm10: quad32) (va_x_xmm2: quad32) (va_x_xmm3: quad32) (va_x_xmm4: quad32) (va_x_xmm5: quad32) (va_x_xmm6: quad32) (va_x_xmm7: quad32) (va_x_xmm9: quad32) (count: nat). let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` (va_get_reg64 rRdx va_old)) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` (va_get_reg64 rRdx va_old) < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) ==> va_k va_sM ((count))))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Vale.X64.Decls.va_state", "Vale.SHA.SHA_helpers.hash256", "Vale.X64.Memory.buffer128", "Prims.nat", "Prims.l_and", "Prims.b2t", "Vale.X64.Decls.va_get_ok", "Vale.X64.CPU_Features_s.sha_enabled", "Vale.X64.CPU_Features_s.sse_enabled", "Vale.X64.Decls.validSrcAddrs128", "Vale.X64.Decls.va_get_mem_heaplet", "Vale.X64.Decls.va_get_reg64", "Vale.X64.Machine_s.rRsi", "Prims.op_Multiply", "Vale.X64.Machine_s.rRdx", "Vale.X64.Decls.va_get_mem_layout", "Vale.Arch.HeapTypes_s.Secret", "Vale.X64.Machine_s.rRcx", "Prims.op_LessThan", "Prims.op_Addition", "Vale.X64.Machine_s.pow2_64", "Prims.eq2", "Prims.int", "Prims.op_Subtraction", "Vale.Def.Words_s.four", "Vale.Def.Types_s.nat32", "Vale.X64.Decls.va_get_xmm", "Vale.Def.Words_s.Mkfour", "Vale.SHA.SHA_helpers.k_reqs", "Vale.X64.Decls.buffer128_as_seq", "Vale.SHA.SHA_helpers.make_hash", "Vale.SHA.SHA_helpers.update_multi_quads", "FStar.Seq.Base.seq", "Vale.Def.Types_s.quad32", "Vale.Arch.Types.reverse_bytes_nat32_quad32_seq", "FStar.Seq.Base.slice", "Vale.X64.Decls.quad32", "Prims.op_GreaterThan", "Prims.l_Forall", "Vale.X64.Flags.t", "Prims.bool", "Vale.X64.Memory.nat64", "Prims.l_imp", "Vale.X64.QuickCodes.precedes_wrap", "Vale.Def.Types_s.nat64", "Vale.X64.State.vale_state", "Vale.X64.Decls.va_upd_xmm", "Vale.X64.Decls.va_upd_reg64", "Vale.X64.Decls.va_upd_ok", "Vale.X64.Decls.va_upd_flags" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ()))) val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_body0 () = (va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_body0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 578 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds in_b k_b (count `op_Multiply` 4) hash_orig) (fun (va_s:va_state) _ -> let (count:nat) = count + 1 in va_QEmpty ((count))))) val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_body0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_body0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_body0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 576 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) :
false
true
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_wp_Loop_body0 (va_old: va_state) (va_in_hash_orig: hash256) (va_in_in_b va_in_k_b: buffer128) (va_in_count: nat) (va_s0: va_state) (va_k: (va_state -> nat -> Type0)) : Type0
[]
Vale.SHA.X64.va_wp_Loop_body0
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_old: Vale.X64.Decls.va_state -> va_in_hash_orig: Vale.SHA.SHA_helpers.hash256 -> va_in_in_b: Vale.X64.Memory.buffer128 -> va_in_k_b: Vale.X64.Memory.buffer128 -> va_in_count: Prims.nat -> va_s0: Vale.X64.Decls.va_state -> va_k: (_: Vale.X64.Decls.va_state -> _: Prims.nat -> Type0) -> Type0
{ "end_col": 21, "end_line": 1646, "start_col": 2, "start_line": 1608 }
Prims.Ghost
val va_lemma_Sha_update_bytes : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Sha_update_bytes ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 ctx_b == 2 /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 in_b == 4 `op_Multiply` va_get_reg64 rRdx va_s0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let hash_in = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) ctx_b)) in let hash_out = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) ctx_b)) in (let input_LE = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b)) in l_and (FStar.Seq.Base.length #FStar.UInt8.t input_LE `op_Modulus` 64 == 0) (hash_out == Vale.SHA.SHA_helpers.update_multi_opaque_vale hash_in input_LE)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))))))))))))))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_lemma_Sha_update_bytes va_b0 va_s0 ctx_b in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Sha_update_bytes va_mods ctx_b in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Sha_update_bytes ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 672 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 702 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 704 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_in = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) ctx_b)) in label va_range1 "***** POSTCONDITION NOT MET AT line 705 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_out = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) ctx_b)) in label va_range1 "***** POSTCONDITION NOT MET AT line 709 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b)) in l_and (FStar.Seq.Base.length #FStar.UInt8.t input_LE `op_Modulus` 64 == 0) (hash_out == Vale.SHA.SHA_helpers.update_multi_opaque_vale hash_in input_LE)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 712 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM)
val va_lemma_Sha_update_bytes : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Sha_update_bytes ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 ctx_b == 2 /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 in_b == 4 `op_Multiply` va_get_reg64 rRdx va_s0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let hash_in = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) ctx_b)) in let hash_out = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) ctx_b)) in (let input_LE = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b)) in l_and (FStar.Seq.Base.length #FStar.UInt8.t input_LE `op_Modulus` 64 == 0) (hash_out == Vale.SHA.SHA_helpers.update_multi_opaque_vale hash_in input_LE)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))))))))))))))) let va_lemma_Sha_update_bytes va_b0 va_s0 ctx_b in_b k_b =
false
null
false
let va_mods:va_mods_t = [ va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem ] in let va_qc = va_qcode_Sha_update_bytes va_mods ctx_b in_b k_b in let va_sM, va_fM, va_g = va_wp_sound_code_norm (va_code_Sha_update_bytes ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 672 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 702 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` (va_get_reg64 rRdx va_s0)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 704 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_in = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) ctx_b)) in label va_range1 "***** POSTCONDITION NOT MET AT line 705 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_out = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) ctx_b)) in label va_range1 "***** POSTCONDITION NOT MET AT line 709 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b)) in l_and ((FStar.Seq.Base.length #FStar.UInt8.t input_LE) `op_Modulus` 64 == 0) (hash_out == Vale.SHA.SHA_helpers.update_multi_opaque_vale hash_in input_LE) ) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 712 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([ va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem ]) va_sM va_s0; (va_sM, va_fM)
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[]
[ "Vale.X64.Decls.va_code", "Vale.X64.Decls.va_state", "Vale.X64.Memory.buffer128", "Vale.X64.QuickCodes.fuel", "Prims.unit", "FStar.Pervasives.Native.Mktuple2", "Vale.X64.Decls.va_fuel", "Vale.X64.QuickCode.va_lemma_norm_mods", "Prims.Cons", "Vale.X64.QuickCode.mod_t", "Vale.X64.QuickCode.va_Mod_flags", "Vale.X64.QuickCode.va_Mod_mem_heaplet", "Vale.X64.QuickCode.va_Mod_xmm", "Vale.X64.QuickCode.va_Mod_reg64", "Vale.X64.Machine_s.rRax", "Vale.X64.Machine_s.rRdx", "Vale.X64.Machine_s.rRsi", "Vale.X64.QuickCode.va_Mod_ok", "Vale.X64.QuickCode.va_Mod_mem", "Prims.Nil", "FStar.Pervasives.assert_norm", "Prims.eq2", "Prims.list", "Vale.X64.QuickCode.__proj__QProc__item__mods", "Vale.SHA.X64.va_code_Sha_update_bytes", "FStar.Pervasives.Native.tuple2", "FStar.Pervasives.Native.tuple3", "Vale.X64.State.vale_state", "Vale.X64.QuickCodes.va_wp_sound_code_norm", "Prims.l_and", "Vale.X64.QuickCodes.label", "Vale.X64.QuickCodes.va_range1", "Prims.b2t", "Vale.X64.Decls.va_get_ok", "Prims.int", "Vale.X64.Decls.va_get_reg64", "Prims.op_Addition", "Prims.op_Multiply", "Prims.op_Modulus", "FStar.Seq.Base.length", "FStar.UInt8.t", "Vale.SHA.SHA_helpers.hash256", "Vale.SHA.SHA_helpers.update_multi_opaque_vale", "FStar.Seq.Base.seq", "Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8", "Vale.Def.Types_s.le_seq_quad32_to_bytes", "Vale.X64.Decls.buffer128_as_seq", "Vale.X64.Decls.va_get_mem_heaplet", "Vale.X64.Decls.modifies_buffer128", "Vale.SHA.SHA_helpers.le_bytes_to_hash", "Vale.X64.QuickCode.quickCode", "Vale.SHA.X64.va_qcode_Sha_update_bytes" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ()))) val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_body0 () = (va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_body0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 578 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds in_b k_b (count `op_Multiply` 4) hash_orig) (fun (va_s:va_state) _ -> let (count:nat) = count + 1 in va_QEmpty ((count))))) val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_body0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_body0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_body0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 576 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0 /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_body0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_body0 (va_code_Loop_body0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_body0 ())) = (va_QProc (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop_while0 val va_code_Loop_while0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_while0 () = (va_Block (va_CCons (va_While (va_cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (va_Block (va_CCons (va_code_Loop_body0 ()) (va_CNil ())))) (va_CNil ()))) val va_codegen_success_Loop_while0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_while0 () = (va_pbool_and (va_codegen_success_Loop_body0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_while0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_while0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qWhile va_mods (Cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (fun va_g -> let (count:nat) = let count = va_g in count in qblock va_mods (fun (va_s:va_state) -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_body0 va_old hash_orig in_b k_b count) (fun (va_s:va_state) (count:nat) -> va_QEmpty ((count))))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_ok va_s /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRsi va_old) in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRcx va_s) k_b 16 (va_get_mem_layout va_s) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_s == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_reg64 rRdx va_s) ((count))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in let va_g = (count) in let (count:nat) = va_g in va_QEmpty ((count))))) val va_lemma_Loop_while0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_while0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig))) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_while0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_while0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_while0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~(va_get_reg64 rRdx va_sM > 0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_while0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_while0 (va_code_Loop_while0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_while0 ())) = (va_QProc (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop val va_code_Loop : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop () = (va_Block (va_CCons (va_code_Loop_while0 ()) (va_CNil ()))) val va_codegen_success_Loop : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop () = (va_pbool_and (va_codegen_success_Loop_while0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (count:nat) = 0 in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 556 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_while0 va_old_s hash_orig in_b k_b count) (fun (va_s:va_state) count -> va_QEmpty (())))) val va_lemma_Loop : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop va_b0 va_s0 in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop va_mods in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 547 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 548 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == 0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 551 column 90 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) ==> va_k va_sM (()))) val va_wpProof_Loop : in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop (va_code_Loop ()) va_s0 in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (va_QProc (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop in_b k_b) (va_wpProof_Loop in_b k_b)) //-- //-- Epilogue val va_code_Epilogue : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Epilogue () = (va_Block (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_CNil ()))))))))) val va_codegen_success_Epilogue : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Epilogue () = (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_ttrue ())))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Epilogue (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Epilogue ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 612 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 613 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 614 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 616 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 617 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 619 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret ctx_b 0) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 620 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret ctx_b 1) (fun (va_s:va_state) _ -> let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 623 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_old_s) (va_get_xmm 2 va_old_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))) val va_lemma_Epilogue : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Epilogue ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Epilogue va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Epilogue va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Epilogue ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 583 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 603 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 606 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Epilogue (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_mem:vale_heap) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_heap0:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_mem va_x_mem va_s0))))) in va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) ==> va_k va_sM (()))) val va_wpProof_Epilogue : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Epilogue ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Epilogue ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Epilogue ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Epilogue (va_code_Epilogue ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Epilogue (ctx_b:buffer128) : (va_quickCode unit (va_code_Epilogue ())) = (va_QProc (va_code_Epilogue ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) (va_wp_Epilogue ctx_b) (va_wpProof_Epilogue ctx_b)) //-- //-- Sha_update val va_code_Sha_update : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Sha_update () = (va_Block (va_CCons (va_code_Preamble ()) (va_CCons (va_code_Loop ()) (va_CCons (va_code_Epilogue ()) (va_CNil ()))))) val va_codegen_success_Sha_update : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Sha_update () = (va_pbool_and (va_codegen_success_Preamble ()) (va_pbool_and (va_codegen_success_Loop ()) (va_pbool_and (va_codegen_success_Epilogue ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Sha_update (va_mods:va_mods_t) (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 667 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Preamble ctx_b) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 668 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop in_b k_b) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 669 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Epilogue ctx_b) (va_QEmpty (())))))) val va_lemma_Sha_update : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Sha_update ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))))))))))))))) [@"opaque_to_smt"] let va_lemma_Sha_update va_b0 va_s0 ctx_b in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Sha_update va_mods ctx_b in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Sha_update ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 627 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 653 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 662 column 103 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 665 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Sha_update (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_mem:vale_heap) (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_heap0:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi (va_upd_mem va_x_mem va_s0)))))))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) ==> va_k va_sM (()))) val va_wpProof_Sha_update : ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Sha_update ctx_b in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Sha_update ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Sha_update ctx_b in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Sha_update (va_code_Sha_update ()) va_s0 ctx_b in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Sha_update (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update ())) = (va_QProc (va_code_Sha_update ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) (va_wp_Sha_update ctx_b in_b k_b) (va_wpProof_Sha_update ctx_b in_b k_b)) //-- //-- Sha_update_bytes #push-options "--z3rlimit 80" #restart-solver val va_code_Sha_update_bytes : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Sha_update_bytes () = (va_Block (va_CCons (va_code_Sha_update ()) (va_CCons (va_Block (va_CNil ())) (va_CNil ())))) val va_codegen_success_Sha_update_bytes : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Sha_update_bytes () = (va_pbool_and (va_codegen_success_Sha_update ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Sha_update_bytes (va_mods:va_mods_t) (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update_bytes ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 714 column 15 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sha_update ctx_b in_b k_b) (fun (va_s:va_state) _ -> let (old_ctx:(seq (four nat32))) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_old_s) ctx_b in let (new_ctx:(seq (four nat32))) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) ctx_b in let (va_arg34:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = old_ctx in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 717 column 24 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_hash_to_bytes va_arg34) (let (va_arg33:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = new_ctx in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 718 column 24 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_hash_to_bytes va_arg33) (let (hash_in:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes old_ctx) in let (hash_out:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes new_ctx) in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 728 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_old_s)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_old_s) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 730 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (hash_out == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_in) (let (va_arg32:(FStar.Seq.Base.seq Vale.SHA.SHA_helpers.byte)) = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes input_LE) in let (va_arg31:(FStar.Seq.Base.seq Vale.Def.Words_s.nat8)) = Vale.Def.Types_s.le_seq_quad32_to_bytes input_LE in let (va_arg30:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = input_LE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 731 column 34 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_equiv_vale hash_in hash_out va_arg30 input_BE va_arg31 va_arg32) (va_QEmpty (()))))))))) val va_lemma_Sha_update_bytes : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Sha_update_bytes ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 ctx_b == 2 /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 in_b == 4 `op_Multiply` va_get_reg64 rRdx va_s0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let hash_in = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) ctx_b)) in let hash_out = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) ctx_b)) in (let input_LE = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b)) in l_and (FStar.Seq.Base.length #FStar.UInt8.t input_LE `op_Modulus` 64 == 0) (hash_out == Vale.SHA.SHA_helpers.update_multi_opaque_vale hash_in input_LE)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))))))))))))))
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 80, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_lemma_Sha_update_bytes : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Sha_update_bytes ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 ctx_b == 2 /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 in_b == 4 `op_Multiply` va_get_reg64 rRdx va_s0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let hash_in = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) ctx_b)) in let hash_out = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) ctx_b)) in (let input_LE = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b)) in l_and (FStar.Seq.Base.length #FStar.UInt8.t input_LE `op_Modulus` 64 == 0) (hash_out == Vale.SHA.SHA_helpers.update_multi_opaque_vale hash_in input_LE)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))))))))))))))
[]
Vale.SHA.X64.va_lemma_Sha_update_bytes
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_b0: Vale.X64.Decls.va_code -> va_s0: Vale.X64.Decls.va_state -> ctx_b: Vale.X64.Memory.buffer128 -> in_b: Vale.X64.Memory.buffer128 -> k_b: Vale.X64.Memory.buffer128 -> Prims.Ghost (Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel)
{ "end_col": 16, "end_line": 2445, "start_col": 58, "start_line": 2412 }
Prims.Tot
val va_quick_Preamble (ctx_b: buffer128) : (va_quickCode unit (va_code_Preamble ()))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b))
val va_quick_Preamble (ctx_b: buffer128) : (va_quickCode unit (va_code_Preamble ())) let va_quick_Preamble (ctx_b: buffer128) : (va_quickCode unit (va_code_Preamble ())) =
false
null
false
(va_QProc (va_code_Preamble ()) ([ va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax ]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Vale.X64.Memory.buffer128", "Vale.X64.QuickCode.va_QProc", "Prims.unit", "Vale.SHA.X64.va_code_Preamble", "Prims.Cons", "Vale.X64.QuickCode.mod_t", "Vale.X64.QuickCode.va_Mod_flags", "Vale.X64.QuickCode.va_Mod_xmm", "Vale.X64.QuickCode.va_Mod_reg64", "Vale.X64.Machine_s.rRax", "Prims.Nil", "Vale.SHA.X64.va_wp_Preamble", "Vale.SHA.X64.va_wpProof_Preamble", "Vale.X64.QuickCode.va_quickCode" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr]
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_quick_Preamble (ctx_b: buffer128) : (va_quickCode unit (va_code_Preamble ()))
[]
Vale.SHA.X64.va_quick_Preamble
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
ctx_b: Vale.X64.Memory.buffer128 -> Vale.X64.QuickCode.va_quickCode Prims.unit (Vale.SHA.X64.va_code_Preamble ())
{ "end_col": 11, "end_line": 189, "start_col": 2, "start_line": 187 }
Prims.Tot
val va_quick_Loop_rounds_0_15 (in_b k_b: buffer128) (offset: nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ()))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset))
val va_quick_Loop_rounds_0_15 (in_b k_b: buffer128) (offset: nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) let va_quick_Loop_rounds_0_15 (in_b k_b: buffer128) (offset: nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) =
false
null
false
(va_QProc (va_code_Loop_rounds_0_15 ()) ([ va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi ]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Vale.X64.Memory.buffer128", "Prims.nat", "Vale.X64.QuickCode.va_QProc", "Prims.unit", "Vale.SHA.X64.va_code_Loop_rounds_0_15", "Prims.Cons", "Vale.X64.QuickCode.mod_t", "Vale.X64.QuickCode.va_Mod_flags", "Vale.X64.QuickCode.va_Mod_xmm", "Vale.X64.QuickCode.va_Mod_reg64", "Vale.X64.Machine_s.rRsi", "Prims.Nil", "Vale.SHA.X64.va_wp_Loop_rounds_0_15", "Vale.SHA.X64.va_wpProof_Loop_rounds_0_15", "Vale.X64.QuickCode.va_quickCode" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_quick_Loop_rounds_0_15 (in_b k_b: buffer128) (offset: nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ()))
[]
Vale.SHA.X64.va_quick_Loop_rounds_0_15
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
in_b: Vale.X64.Memory.buffer128 -> k_b: Vale.X64.Memory.buffer128 -> offset: Prims.nat -> Vale.X64.QuickCode.va_quickCode Prims.unit (Vale.SHA.X64.va_code_Loop_rounds_0_15 ())
{ "end_col": 50, "end_line": 588, "start_col": 2, "start_line": 585 }
Prims.Ghost
val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g))))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) let va_wpProof_Preamble ctx_b va_s0 va_k =
false
null
false
let va_sM, va_f0 = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([ va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax ]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[]
[ "Vale.X64.Memory.buffer128", "Vale.X64.Decls.va_state", "Prims.unit", "Vale.X64.Decls.va_fuel", "FStar.Pervasives.Native.Mktuple3", "Vale.X64.QuickCode.va_lemma_norm_mods", "Prims.Cons", "Vale.X64.QuickCode.mod_t", "Vale.X64.QuickCode.va_Mod_flags", "Vale.X64.QuickCode.va_Mod_xmm", "Vale.X64.QuickCode.va_Mod_reg64", "Vale.X64.Machine_s.rRax", "Prims.Nil", "Prims._assert", "Vale.X64.Decls.va_state_eq", "Vale.X64.Decls.va_update_flags", "Vale.X64.Decls.va_update_xmm", "Vale.X64.Decls.va_update_reg64", "Vale.X64.Decls.va_update_ok", "Vale.X64.Decls.va_lemma_upd_update", "FStar.Pervasives.Native.tuple3", "FStar.Pervasives.Native.tuple2", "Vale.X64.State.vale_state", "Vale.SHA.X64.va_lemma_Preamble", "Vale.SHA.X64.va_code_Preamble" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g))))
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g))))
[]
Vale.SHA.X64.va_wpProof_Preamble
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
ctx_b: Vale.X64.Memory.buffer128 -> va_s0: Vale.X64.Decls.va_state -> va_k: (_: Vale.X64.Decls.va_state -> _: Prims.unit -> Type0) -> Prims.Ghost ((Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel) * Prims.unit)
{ "end_col": 22, "end_line": 183, "start_col": 42, "start_line": 174 }
Prims.Tot
val va_wp_Loop_rounds_0_15 (in_b k_b: buffer128) (offset: nat) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (())))
val va_wp_Loop_rounds_0_15 (in_b k_b: buffer128) (offset: nat) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0 let va_wp_Loop_rounds_0_15 (in_b k_b: buffer128) (offset: nat) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0 =
false
null
false
(va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi: nat64) (va_x_xmm0: quad32) (va_x_xmm1: quad32) (va_x_xmm2: quad32) (va_x_xmm3: quad32) (va_x_xmm4: quad32) (va_x_xmm5: quad32) (va_x_xmm6: quad32) (va_x_xmm7: quad32) (va_x_xmm9: quad32) (va_x_xmm10: quad32) (va_x_efl: Vale.X64.Flags.t). let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let block:block_w = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (())))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Vale.X64.Memory.buffer128", "Prims.nat", "Vale.X64.Decls.va_state", "Prims.unit", "Prims.l_and", "Prims.b2t", "Vale.X64.Decls.va_get_ok", "Vale.X64.CPU_Features_s.sha_enabled", "Vale.X64.CPU_Features_s.sse_enabled", "Vale.X64.Decls.validSrcAddrsOffset128", "Vale.X64.Decls.va_get_mem_heaplet", "Vale.X64.Decls.va_get_reg64", "Vale.X64.Machine_s.rRsi", "Vale.X64.Decls.va_get_mem_layout", "Vale.Arch.HeapTypes_s.Secret", "Vale.X64.Decls.validSrcAddrs128", "Vale.X64.Machine_s.rRcx", "Prims.op_LessThan", "Prims.op_Addition", "Vale.X64.Machine_s.pow2_64", "Prims.eq2", "Vale.Def.Words_s.four", "Vale.Def.Types_s.nat32", "Vale.X64.Decls.va_get_xmm", "Vale.Def.Words_s.Mkfour", "Vale.SHA.SHA_helpers.k_reqs", "Vale.X64.Decls.buffer128_as_seq", "Prims.l_Forall", "Vale.X64.Memory.nat64", "Vale.X64.Decls.quad32", "Vale.X64.Flags.t", "Prims.l_imp", "Prims.int", "Vale.SHA.SHA_helpers.hash256", "Vale.SHA.SHA_helpers.make_hash", "Vale.SHA.SHA_helpers.repeat_range_vale", "Vale.Def.Types_s.quad32", "Vale.SHA.SHA_helpers.ws_quad32", "Vale.Arch.Types.add_wrap_quad32", "Vale.SHA.SHA_helpers.ws_partial", "Vale.SHA.SHA_helpers.block_w", "Vale.SHA.SHA_helpers.quads_to_block", "FStar.Seq.Base.seq", "Vale.Arch.Types.reverse_bytes_nat32_quad32_seq", "FStar.Seq.Base.slice", "Vale.X64.State.vale_state", "Vale.X64.Decls.va_upd_flags", "Vale.X64.Decls.va_upd_xmm", "Vale.X64.Decls.va_upd_reg64" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state)
false
true
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_wp_Loop_rounds_0_15 (in_b k_b: buffer128) (offset: nat) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0
[]
Vale.SHA.X64.va_wp_Loop_rounds_0_15
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
in_b: Vale.X64.Memory.buffer128 -> k_b: Vale.X64.Memory.buffer128 -> offset: Prims.nat -> va_s0: Vale.X64.Decls.va_state -> va_k: (_: Vale.X64.Decls.va_state -> _: Prims.unit -> Type0) -> Type0
{ "end_col": 68, "end_line": 556, "start_col": 2, "start_line": 532 }
Prims.Tot
val va_qcode_Loop (va_mods: va_mods_t) (in_b k_b: buffer128) : (va_quickCode unit (va_code_Loop ()))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_qcode_Loop (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (count:nat) = 0 in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 556 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_while0 va_old_s hash_orig in_b k_b count) (fun (va_s:va_state) count -> va_QEmpty (()))))
val va_qcode_Loop (va_mods: va_mods_t) (in_b k_b: buffer128) : (va_quickCode unit (va_code_Loop ())) let va_qcode_Loop (va_mods: va_mods_t) (in_b k_b: buffer128) : (va_quickCode unit (va_code_Loop ())) =
false
null
false
(qblock va_mods (fun (va_s: va_state) -> let va_old_s:va_state = va_s in let hash_orig:hash256 = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let count:nat = 0 in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 556 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_while0 va_old_s hash_orig in_b k_b count) (fun (va_s: va_state) count -> va_QEmpty (()))))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Vale.X64.QuickCode.va_mods_t", "Vale.X64.Memory.buffer128", "Vale.X64.QuickCodes.qblock", "Prims.unit", "Prims.Cons", "Vale.X64.Decls.va_code", "Vale.SHA.X64.va_code_Loop_while0", "Prims.Nil", "Vale.X64.Machine_s.precode", "Vale.X64.Decls.ins", "Vale.X64.Decls.ocmp", "Vale.X64.Decls.va_state", "Vale.X64.QuickCodes.va_QBind", "Prims.nat", "Vale.X64.QuickCodes.va_range1", "Vale.SHA.X64.va_quick_Loop_while0", "Vale.X64.QuickCodes.va_QEmpty", "Vale.X64.QuickCodes.quickCodes", "Vale.SHA.SHA_helpers.hash256", "Vale.SHA.SHA_helpers.make_hash", "Vale.X64.Decls.va_get_xmm", "Vale.X64.State.vale_state", "Vale.X64.QuickCode.va_quickCode", "Vale.SHA.X64.va_code_Loop" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ()))) val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_body0 () = (va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_body0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 578 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds in_b k_b (count `op_Multiply` 4) hash_orig) (fun (va_s:va_state) _ -> let (count:nat) = count + 1 in va_QEmpty ((count))))) val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_body0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_body0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_body0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 576 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0 /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_body0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_body0 (va_code_Loop_body0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_body0 ())) = (va_QProc (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop_while0 val va_code_Loop_while0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_while0 () = (va_Block (va_CCons (va_While (va_cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (va_Block (va_CCons (va_code_Loop_body0 ()) (va_CNil ())))) (va_CNil ()))) val va_codegen_success_Loop_while0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_while0 () = (va_pbool_and (va_codegen_success_Loop_body0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_while0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_while0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qWhile va_mods (Cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (fun va_g -> let (count:nat) = let count = va_g in count in qblock va_mods (fun (va_s:va_state) -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_body0 va_old hash_orig in_b k_b count) (fun (va_s:va_state) (count:nat) -> va_QEmpty ((count))))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_ok va_s /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRsi va_old) in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRcx va_s) k_b 16 (va_get_mem_layout va_s) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_s == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_reg64 rRdx va_s) ((count))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in let va_g = (count) in let (count:nat) = va_g in va_QEmpty ((count))))) val va_lemma_Loop_while0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_while0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig))) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_while0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_while0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_while0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~(va_get_reg64 rRdx va_sM > 0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_while0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_while0 (va_code_Loop_while0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_while0 ())) = (va_QProc (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop val va_code_Loop : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop () = (va_Block (va_CCons (va_code_Loop_while0 ()) (va_CNil ()))) val va_codegen_success_Loop : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop () = (va_pbool_and (va_codegen_success_Loop_while0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_qcode_Loop (va_mods: va_mods_t) (in_b k_b: buffer128) : (va_quickCode unit (va_code_Loop ()))
[]
Vale.SHA.X64.va_qcode_Loop
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_mods: Vale.X64.QuickCode.va_mods_t -> in_b: Vale.X64.Memory.buffer128 -> k_b: Vale.X64.Memory.buffer128 -> Vale.X64.QuickCode.va_quickCode Prims.unit (Vale.SHA.X64.va_code_Loop ())
{ "end_col": 21, "end_line": 1919, "start_col": 2, "start_line": 1914 }
Prims.Tot
val va_quick_Msg_shift: Prims.unit -> (va_quickCode unit (va_code_Msg_shift ()))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift)
val va_quick_Msg_shift: Prims.unit -> (va_quickCode unit (va_code_Msg_shift ())) let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) =
false
null
false
(va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift)
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Prims.unit", "Vale.X64.QuickCode.va_QProc", "Vale.SHA.X64.va_code_Msg_shift", "Prims.Cons", "Vale.X64.QuickCode.mod_t", "Vale.X64.QuickCode.va_Mod_xmm", "Prims.Nil", "Vale.SHA.X64.va_wp_Msg_shift", "Vale.SHA.X64.va_wpProof_Msg_shift", "Vale.X64.QuickCode.va_quickCode" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr]
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_quick_Msg_shift: Prims.unit -> (va_quickCode unit (va_code_Msg_shift ()))
[]
Vale.SHA.X64.va_quick_Msg_shift
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
_: Prims.unit -> Vale.X64.QuickCode.va_quickCode Prims.unit (Vale.SHA.X64.va_code_Msg_shift ())
{ "end_col": 70, "end_line": 871, "start_col": 2, "start_line": 870 }
Prims.Tot
val va_quick_Loop_rounds_16_51 (k_b: buffer128) (block: block_w) (hash_orig: hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ()))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig))
val va_quick_Loop_rounds_16_51 (k_b: buffer128) (block: block_w) (hash_orig: hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) let va_quick_Loop_rounds_16_51 (k_b: buffer128) (block: block_w) (hash_orig: hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) =
false
null
false
(va_QProc (va_code_Loop_rounds_16_51 ()) ([ va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0 ]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Vale.X64.Memory.buffer128", "Vale.SHA.SHA_helpers.block_w", "Vale.SHA.SHA_helpers.hash256", "Vale.X64.QuickCode.va_QProc", "Prims.unit", "Vale.SHA.X64.va_code_Loop_rounds_16_51", "Prims.Cons", "Vale.X64.QuickCode.mod_t", "Vale.X64.QuickCode.va_Mod_flags", "Vale.X64.QuickCode.va_Mod_xmm", "Prims.Nil", "Vale.SHA.X64.va_wp_Loop_rounds_16_51", "Vale.SHA.X64.va_wpProof_Loop_rounds_16_51", "Vale.X64.QuickCode.va_quickCode" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_quick_Loop_rounds_16_51 (k_b: buffer128) (block: block_w) (hash_orig: hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ()))
[]
Vale.SHA.X64.va_quick_Loop_rounds_16_51
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
k_b: Vale.X64.Memory.buffer128 -> block: Vale.SHA.SHA_helpers.block_w -> hash_orig: Vale.SHA.SHA_helpers.hash256 -> Vale.X64.QuickCode.va_quickCode Prims.unit (Vale.SHA.X64.va_code_Loop_rounds_16_51 ())
{ "end_col": 15, "end_line": 1058, "start_col": 2, "start_line": 1055 }
Prims.Ghost
val va_wpProof_Sha_update_bytes_stdcall : win:bool -> ctx_b:buffer128 -> in_b:buffer128 -> num_val:nat64 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Sha_update_bytes_stdcall win ctx_b in_b num_val k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Sha_update_bytes_stdcall win) ([va_Mod_stackTaint; va_Mod_stack; va_Mod_mem_layout; va_Mod_mem_heaplet 0; va_Mod_flags; va_Mod_xmm 15; va_Mod_xmm 14; va_Mod_xmm 13; va_Mod_xmm 12; va_Mod_xmm 11; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rR15; va_Mod_reg64 rR14; va_Mod_reg64 rR13; va_Mod_reg64 rR12; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9; va_Mod_reg64 rR8; va_Mod_reg64 rRsp; va_Mod_reg64 rRbp; va_Mod_reg64 rRdi; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g))))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_wpProof_Sha_update_bytes_stdcall win ctx_b in_b num_val k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Sha_update_bytes_stdcall (va_code_Sha_update_bytes_stdcall win) va_s0 win ctx_b in_b num_val k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_stackTaint va_sM (va_update_stack va_sM (va_update_mem_layout va_sM (va_update_mem_heaplet 0 va_sM (va_update_flags va_sM (va_update_xmm 15 va_sM (va_update_xmm 14 va_sM (va_update_xmm 13 va_sM (va_update_xmm 12 va_sM (va_update_xmm 11 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rR15 va_sM (va_update_reg64 rR14 va_sM (va_update_reg64 rR13 va_sM (va_update_reg64 rR12 va_sM (va_update_reg64 rR11 va_sM (va_update_reg64 rR10 va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rR8 va_sM (va_update_reg64 rRsp va_sM (va_update_reg64 rRbp va_sM (va_update_reg64 rRdi va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))))))))))))))))))))))))))))))))))); va_lemma_norm_mods ([va_Mod_stackTaint; va_Mod_stack; va_Mod_mem_layout; va_Mod_mem_heaplet 0; va_Mod_flags; va_Mod_xmm 15; va_Mod_xmm 14; va_Mod_xmm 13; va_Mod_xmm 12; va_Mod_xmm 11; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rR15; va_Mod_reg64 rR14; va_Mod_reg64 rR13; va_Mod_reg64 rR12; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9; va_Mod_reg64 rR8; va_Mod_reg64 rRsp; va_Mod_reg64 rRbp; va_Mod_reg64 rRdi; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_mem]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
val va_wpProof_Sha_update_bytes_stdcall : win:bool -> ctx_b:buffer128 -> in_b:buffer128 -> num_val:nat64 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Sha_update_bytes_stdcall win ctx_b in_b num_val k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Sha_update_bytes_stdcall win) ([va_Mod_stackTaint; va_Mod_stack; va_Mod_mem_layout; va_Mod_mem_heaplet 0; va_Mod_flags; va_Mod_xmm 15; va_Mod_xmm 14; va_Mod_xmm 13; va_Mod_xmm 12; va_Mod_xmm 11; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rR15; va_Mod_reg64 rR14; va_Mod_reg64 rR13; va_Mod_reg64 rR12; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9; va_Mod_reg64 rR8; va_Mod_reg64 rRsp; va_Mod_reg64 rRbp; va_Mod_reg64 rRdi; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g)))) let va_wpProof_Sha_update_bytes_stdcall win ctx_b in_b num_val k_b va_s0 va_k =
false
null
false
let va_sM, va_f0 = va_lemma_Sha_update_bytes_stdcall (va_code_Sha_update_bytes_stdcall win) va_s0 win ctx_b in_b num_val k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_stackTaint va_sM (va_update_stack va_sM (va_update_mem_layout va_sM (va_update_mem_heaplet 0 va_sM (va_update_flags va_sM (va_update_xmm 15 va_sM (va_update_xmm 14 va_sM (va_update_xmm 13 va_sM (va_update_xmm 12 va_sM (va_update_xmm 11 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rR15 va_sM (va_update_reg64 rR14 va_sM (va_update_reg64 rR13 va_sM ( va_update_reg64 rR12 va_sM ( va_update_reg64 rR11 va_sM ( va_update_reg64 rR10 va_sM ( va_update_reg64 rR9 va_sM ( va_update_reg64 rR8 va_sM ( va_update_reg64 rRsp va_sM ( va_update_reg64 rRbp va_sM ( va_update_reg64 rRdi va_sM ( va_update_reg64 rRsi va_sM ( va_update_reg64 rRdx va_sM ( va_update_reg64 rRcx va_sM ( va_update_reg64 rRbx va_sM ( va_update_reg64 rRax va_sM ( va_update_ok va_sM ( va_update_mem va_sM va_s0 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )) )))))))))) ))))))))))))); va_lemma_norm_mods ([ va_Mod_stackTaint; va_Mod_stack; va_Mod_mem_layout; va_Mod_mem_heaplet 0; va_Mod_flags; va_Mod_xmm 15; va_Mod_xmm 14; va_Mod_xmm 13; va_Mod_xmm 12; va_Mod_xmm 11; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rR15; va_Mod_reg64 rR14; va_Mod_reg64 rR13; va_Mod_reg64 rR12; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9; va_Mod_reg64 rR8; va_Mod_reg64 rRsp; va_Mod_reg64 rRbp; va_Mod_reg64 rRdi; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_mem ]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[]
[ "Prims.bool", "Vale.X64.Memory.buffer128", "Vale.X64.Memory.nat64", "Vale.X64.Decls.va_state", "Prims.unit", "Vale.X64.Decls.va_fuel", "FStar.Pervasives.Native.Mktuple3", "Vale.X64.QuickCode.va_lemma_norm_mods", "Prims.Cons", "Vale.X64.QuickCode.mod_t", "Vale.X64.QuickCode.va_Mod_stackTaint", "Vale.X64.QuickCode.va_Mod_stack", "Vale.X64.QuickCode.va_Mod_mem_layout", "Vale.X64.QuickCode.va_Mod_mem_heaplet", "Vale.X64.QuickCode.va_Mod_flags", "Vale.X64.QuickCode.va_Mod_xmm", "Vale.X64.QuickCode.va_Mod_reg64", "Vale.X64.Machine_s.rR15", "Vale.X64.Machine_s.rR14", "Vale.X64.Machine_s.rR13", "Vale.X64.Machine_s.rR12", "Vale.X64.Machine_s.rR11", "Vale.X64.Machine_s.rR10", "Vale.X64.Machine_s.rR9", "Vale.X64.Machine_s.rR8", "Vale.X64.Machine_s.rRsp", "Vale.X64.Machine_s.rRbp", "Vale.X64.Machine_s.rRdi", "Vale.X64.Machine_s.rRsi", "Vale.X64.Machine_s.rRdx", "Vale.X64.Machine_s.rRcx", "Vale.X64.Machine_s.rRbx", "Vale.X64.Machine_s.rRax", "Vale.X64.QuickCode.va_Mod_mem", "Prims.Nil", "Prims._assert", "Vale.X64.Decls.va_state_eq", "Vale.X64.Decls.va_update_stackTaint", "Vale.X64.Decls.va_update_stack", "Vale.X64.Decls.va_update_mem_layout", "Vale.X64.Decls.va_update_mem_heaplet", "Vale.X64.Decls.va_update_flags", "Vale.X64.Decls.va_update_xmm", "Vale.X64.Decls.va_update_reg64", "Vale.X64.Decls.va_update_ok", "Vale.X64.Decls.va_update_mem", "Vale.X64.Decls.va_lemma_upd_update", "FStar.Pervasives.Native.tuple3", "FStar.Pervasives.Native.tuple2", "Vale.X64.State.vale_state", "Vale.SHA.X64.va_lemma_Sha_update_bytes_stdcall", "Vale.SHA.X64.va_code_Sha_update_bytes_stdcall" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ()))) val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_body0 () = (va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_body0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 578 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds in_b k_b (count `op_Multiply` 4) hash_orig) (fun (va_s:va_state) _ -> let (count:nat) = count + 1 in va_QEmpty ((count))))) val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_body0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_body0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_body0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 576 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0 /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_body0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_body0 (va_code_Loop_body0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_body0 ())) = (va_QProc (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop_while0 val va_code_Loop_while0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_while0 () = (va_Block (va_CCons (va_While (va_cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (va_Block (va_CCons (va_code_Loop_body0 ()) (va_CNil ())))) (va_CNil ()))) val va_codegen_success_Loop_while0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_while0 () = (va_pbool_and (va_codegen_success_Loop_body0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_while0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_while0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qWhile va_mods (Cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (fun va_g -> let (count:nat) = let count = va_g in count in qblock va_mods (fun (va_s:va_state) -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_body0 va_old hash_orig in_b k_b count) (fun (va_s:va_state) (count:nat) -> va_QEmpty ((count))))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_ok va_s /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRsi va_old) in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRcx va_s) k_b 16 (va_get_mem_layout va_s) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_s == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_reg64 rRdx va_s) ((count))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in let va_g = (count) in let (count:nat) = va_g in va_QEmpty ((count))))) val va_lemma_Loop_while0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_while0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig))) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_while0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_while0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_while0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~(va_get_reg64 rRdx va_sM > 0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_while0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_while0 (va_code_Loop_while0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_while0 ())) = (va_QProc (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop val va_code_Loop : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop () = (va_Block (va_CCons (va_code_Loop_while0 ()) (va_CNil ()))) val va_codegen_success_Loop : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop () = (va_pbool_and (va_codegen_success_Loop_while0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (count:nat) = 0 in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 556 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_while0 va_old_s hash_orig in_b k_b count) (fun (va_s:va_state) count -> va_QEmpty (())))) val va_lemma_Loop : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop va_b0 va_s0 in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop va_mods in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 547 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 548 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == 0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 551 column 90 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) ==> va_k va_sM (()))) val va_wpProof_Loop : in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop (va_code_Loop ()) va_s0 in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (va_QProc (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop in_b k_b) (va_wpProof_Loop in_b k_b)) //-- //-- Epilogue val va_code_Epilogue : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Epilogue () = (va_Block (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_CNil ()))))))))) val va_codegen_success_Epilogue : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Epilogue () = (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_ttrue ())))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Epilogue (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Epilogue ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 612 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 613 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 614 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 616 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 617 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 619 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret ctx_b 0) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 620 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret ctx_b 1) (fun (va_s:va_state) _ -> let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 623 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_old_s) (va_get_xmm 2 va_old_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))) val va_lemma_Epilogue : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Epilogue ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Epilogue va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Epilogue va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Epilogue ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 583 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 603 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 606 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Epilogue (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_mem:vale_heap) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_heap0:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_mem va_x_mem va_s0))))) in va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) ==> va_k va_sM (()))) val va_wpProof_Epilogue : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Epilogue ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Epilogue ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Epilogue ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Epilogue (va_code_Epilogue ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Epilogue (ctx_b:buffer128) : (va_quickCode unit (va_code_Epilogue ())) = (va_QProc (va_code_Epilogue ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) (va_wp_Epilogue ctx_b) (va_wpProof_Epilogue ctx_b)) //-- //-- Sha_update val va_code_Sha_update : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Sha_update () = (va_Block (va_CCons (va_code_Preamble ()) (va_CCons (va_code_Loop ()) (va_CCons (va_code_Epilogue ()) (va_CNil ()))))) val va_codegen_success_Sha_update : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Sha_update () = (va_pbool_and (va_codegen_success_Preamble ()) (va_pbool_and (va_codegen_success_Loop ()) (va_pbool_and (va_codegen_success_Epilogue ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Sha_update (va_mods:va_mods_t) (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 667 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Preamble ctx_b) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 668 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop in_b k_b) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 669 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Epilogue ctx_b) (va_QEmpty (())))))) val va_lemma_Sha_update : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Sha_update ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))))))))))))))) [@"opaque_to_smt"] let va_lemma_Sha_update va_b0 va_s0 ctx_b in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Sha_update va_mods ctx_b in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Sha_update ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 627 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 653 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 662 column 103 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 665 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Sha_update (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_mem:vale_heap) (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_heap0:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi (va_upd_mem va_x_mem va_s0)))))))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) ==> va_k va_sM (()))) val va_wpProof_Sha_update : ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Sha_update ctx_b in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Sha_update ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Sha_update ctx_b in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Sha_update (va_code_Sha_update ()) va_s0 ctx_b in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Sha_update (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update ())) = (va_QProc (va_code_Sha_update ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) (va_wp_Sha_update ctx_b in_b k_b) (va_wpProof_Sha_update ctx_b in_b k_b)) //-- //-- Sha_update_bytes #push-options "--z3rlimit 80" #restart-solver val va_code_Sha_update_bytes : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Sha_update_bytes () = (va_Block (va_CCons (va_code_Sha_update ()) (va_CCons (va_Block (va_CNil ())) (va_CNil ())))) val va_codegen_success_Sha_update_bytes : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Sha_update_bytes () = (va_pbool_and (va_codegen_success_Sha_update ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Sha_update_bytes (va_mods:va_mods_t) (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update_bytes ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 714 column 15 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sha_update ctx_b in_b k_b) (fun (va_s:va_state) _ -> let (old_ctx:(seq (four nat32))) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_old_s) ctx_b in let (new_ctx:(seq (four nat32))) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) ctx_b in let (va_arg34:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = old_ctx in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 717 column 24 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_hash_to_bytes va_arg34) (let (va_arg33:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = new_ctx in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 718 column 24 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_hash_to_bytes va_arg33) (let (hash_in:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes old_ctx) in let (hash_out:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes new_ctx) in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 728 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_old_s)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_old_s) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 730 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (hash_out == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_in) (let (va_arg32:(FStar.Seq.Base.seq Vale.SHA.SHA_helpers.byte)) = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes input_LE) in let (va_arg31:(FStar.Seq.Base.seq Vale.Def.Words_s.nat8)) = Vale.Def.Types_s.le_seq_quad32_to_bytes input_LE in let (va_arg30:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = input_LE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 731 column 34 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_equiv_vale hash_in hash_out va_arg30 input_BE va_arg31 va_arg32) (va_QEmpty (()))))))))) val va_lemma_Sha_update_bytes : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Sha_update_bytes ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 ctx_b == 2 /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 in_b == 4 `op_Multiply` va_get_reg64 rRdx va_s0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let hash_in = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) ctx_b)) in let hash_out = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) ctx_b)) in (let input_LE = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b)) in l_and (FStar.Seq.Base.length #FStar.UInt8.t input_LE `op_Modulus` 64 == 0) (hash_out == Vale.SHA.SHA_helpers.update_multi_opaque_vale hash_in input_LE)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))))))))))))))) [@"opaque_to_smt"] let va_lemma_Sha_update_bytes va_b0 va_s0 ctx_b in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Sha_update_bytes va_mods ctx_b in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Sha_update_bytes ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 672 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 702 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 704 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_in = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) ctx_b)) in label va_range1 "***** POSTCONDITION NOT MET AT line 705 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_out = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) ctx_b)) in label va_range1 "***** POSTCONDITION NOT MET AT line 709 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b)) in l_and (FStar.Seq.Base.length #FStar.UInt8.t input_LE `op_Modulus` 64 == 0) (hash_out == Vale.SHA.SHA_helpers.update_multi_opaque_vale hash_in input_LE)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 712 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Sha_update_bytes (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 ctx_b == 2 /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 in_b == 4 `op_Multiply` va_get_reg64 rRdx va_s0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_mem:vale_heap) (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_heap0:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi (va_upd_mem va_x_mem va_s0)))))))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let hash_in = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) ctx_b)) in let hash_out = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) ctx_b)) in (let input_LE = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b)) in l_and (FStar.Seq.Base.length #FStar.UInt8.t input_LE `op_Modulus` 64 == 0) (hash_out == Vale.SHA.SHA_helpers.update_multi_opaque_vale hash_in input_LE)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM))) ==> va_k va_sM (()))) val va_wpProof_Sha_update_bytes : ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Sha_update_bytes ctx_b in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Sha_update_bytes ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Sha_update_bytes ctx_b in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Sha_update_bytes (va_code_Sha_update_bytes ()) va_s0 ctx_b in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Sha_update_bytes (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update_bytes ())) = (va_QProc (va_code_Sha_update_bytes ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) (va_wp_Sha_update_bytes ctx_b in_b k_b) (va_wpProof_Sha_update_bytes ctx_b in_b k_b)) #pop-options //-- //-- Sha_update_bytes_stdcall #push-options "--z3rlimit 80" #restart-solver [@ "opaque_to_smt" va_qattr] let va_code_Sha_update_bytes_stdcall win = (va_Block (va_CCons (va_code_CreateHeaplets ()) (va_CCons (if win then va_Block (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 15) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 14) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 13) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 12) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 11) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 10) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 9) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 8) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR15)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR14)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR13)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR12)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRsi)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRdi)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRbp)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRbx)) (va_CNil ()))))))))))))))))))) else va_Block (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR15)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR14)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR13)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR12)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRsi)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRdi)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRbp)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRbx)) (va_CNil ())))))))))) (va_CCons (if win then va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRdi) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRsi) (va_op_opr64_reg64 rRdx)) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRdx) (va_op_opr64_reg64 rR8)) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))) else va_Block (va_CNil ())) (va_CCons (va_code_Sha_update_bytes ()) (va_CCons (if win then va_Block (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRbx)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRbp)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRdi)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRsi)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR12)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR13)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR14)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR15)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 8) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 9) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 10) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 11) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 12) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 13) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 14) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 15) (va_op_reg_opr64_reg64 rRax)) (va_CNil ()))))))))))))))))))) else va_Block (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRbx)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRbp)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRdi)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRsi)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR12)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR13)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR14)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR15)) (va_CNil ())))))))))) (va_CCons (va_code_DestroyHeaplets ()) (va_CNil ())))))))) [@ "opaque_to_smt" va_qattr] let va_codegen_success_Sha_update_bytes_stdcall win = (va_pbool_and (va_codegen_success_CreateHeaplets ()) (va_pbool_and (if win then va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 15) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 14) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 13) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 12) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 11) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 10) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 9) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 8) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rR15)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rR14)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rR13)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rR12)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rRsi)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rRdi)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rRbp)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rRbx)) (va_ttrue ())))))))))))))))))) else va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rR15)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rR14)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rR13)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rR12)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rRsi)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rRdi)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rRbp)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rRbx)) (va_ttrue ()))))))))) (va_pbool_and (if win then va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRdi) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRsi) (va_op_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRdx) (va_op_opr64_reg64 rR8)) (va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))) else va_ttrue ()) (va_pbool_and (va_codegen_success_Sha_update_bytes ()) (va_pbool_and (if win then va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rRbp)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rRdi)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rRsi)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rR12)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rR13)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rR14)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rR15)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 8) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 9) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 10) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 11) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 12) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 13) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 14) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 15) (va_op_reg_opr64_reg64 rRax)) (va_ttrue ())))))))))))))))))) else va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rRbp)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rRdi)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rRsi)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rR12)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rR13)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rR14)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rR15)) (va_ttrue ()))))))))) (va_pbool_and (va_codegen_success_DestroyHeaplets ()) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Sha_update_bytes_stdcall (va_mods:va_mods_t) (win:bool) (ctx_b:buffer128) (in_b:buffer128) (num_val:nat64) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update_bytes_stdcall win)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ctx_ptr:(va_int_range 0 18446744073709551615)) = va_if win (fun _ -> va_get_reg64 rRcx va_s) (fun _ -> va_get_reg64 rRdi va_s) in let (in_ptr:(va_int_range 0 18446744073709551615)) = va_if win (fun _ -> va_get_reg64 rRdx va_s) (fun _ -> va_get_reg64 rRsi va_s) in let (num:(va_int_range 0 18446744073709551615)) = va_if win (fun _ -> va_get_reg64 rR8 va_s) (fun _ -> va_get_reg64 rRdx va_s) in let (k_ptr:(va_int_range 0 18446744073709551615)) = va_if win (fun _ -> va_get_reg64 rR9 va_s) (fun _ -> va_get_reg64 rRcx va_s) in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 813 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_CreateHeaplets ([declare_buffer128 in_b 0 Secret Immutable; declare_buffer128 k_b 0 Secret Immutable; declare_buffer128 ctx_b 0 Secret Mutable])) (fun (va_s:va_state) _ -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 819 column 15 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qInlineIf va_mods win (qblock va_mods (fun (va_s:va_state) -> va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 821 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PushXmm_Secret (va_op_xmm_xmm 15) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 822 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PushXmm_Secret (va_op_xmm_xmm 14) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 823 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PushXmm_Secret (va_op_xmm_xmm 13) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 824 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PushXmm_Secret (va_op_xmm_xmm 12) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 825 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PushXmm_Secret (va_op_xmm_xmm 11) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 826 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PushXmm_Secret (va_op_xmm_xmm 10) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 827 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PushXmm_Secret (va_op_xmm_xmm 9) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 828 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PushXmm_Secret (va_op_xmm_xmm 8) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 829 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PushXmm_Secret (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 830 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PushXmm_Secret (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 831 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rR15)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 832 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rR14)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 833 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rR13)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 834 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rR12)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 835 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rRsi)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 836 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rRdi)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 837 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rRbp)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 838 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rRbx)) (va_QEmpty (()))))))))))))))))))))) (qblock va_mods (fun (va_s:va_state) -> va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 842 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rR15)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 843 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rR14)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 844 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rR13)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 845 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rR12)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 846 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rRsi)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 847 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rRdi)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 848 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rRbp)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 849 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rRbx)) (va_QEmpty (())))))))))))) (fun (va_s:va_state) va_g -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 852 column 15 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qInlineIf va_mods win (qblock va_mods (fun (va_s:va_state) -> va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 854 column 14 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov64 (va_op_dst_opr64_reg64 rRdi) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 855 column 14 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov64 (va_op_dst_opr64_reg64 rRsi) (va_op_opr64_reg64 rRdx)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 856 column 14 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov64 (va_op_dst_opr64_reg64 rRdx) (va_op_opr64_reg64 rR8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 857 column 14 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))) (qblock va_mods (fun (va_s:va_state) -> va_QEmpty (())))) (fun (va_s:va_state) va_g -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 860 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sha_update_bytes ctx_b in_b k_b) (fun (va_s:va_state) _ -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 863 column 15 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qInlineIf va_mods win (qblock va_mods (fun (va_s:va_state) -> va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 864 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rRbx)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 865 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rRbp)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 866 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rRdi)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 867 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rRsi)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 868 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rR12)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 869 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rR13)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 870 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rR14)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 871 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rR15)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 873 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PopXmm_Secret (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRax) (va_get_xmm 6 va_old_s)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 874 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PopXmm_Secret (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax) (va_get_xmm 7 va_old_s)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 875 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PopXmm_Secret (va_op_xmm_xmm 8) (va_op_reg_opr64_reg64 rRax) (va_get_xmm 8 va_old_s)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 876 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PopXmm_Secret (va_op_xmm_xmm 9) (va_op_reg_opr64_reg64 rRax) (va_get_xmm 9 va_old_s)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 877 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PopXmm_Secret (va_op_xmm_xmm 10) (va_op_reg_opr64_reg64 rRax) (va_get_xmm 10 va_old_s)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 878 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PopXmm_Secret (va_op_xmm_xmm 11) (va_op_reg_opr64_reg64 rRax) (va_get_xmm 11 va_old_s)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 879 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PopXmm_Secret (va_op_xmm_xmm 12) (va_op_reg_opr64_reg64 rRax) (va_get_xmm 12 va_old_s)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 880 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PopXmm_Secret (va_op_xmm_xmm 13) (va_op_reg_opr64_reg64 rRax) (va_get_xmm 13 va_old_s)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 881 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PopXmm_Secret (va_op_xmm_xmm 14) (va_op_reg_opr64_reg64 rRax) (va_get_xmm 14 va_old_s)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 882 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PopXmm_Secret (va_op_xmm_xmm 15) (va_op_reg_opr64_reg64 rRax) (va_get_xmm 15 va_old_s)) (va_QEmpty (()))))))))))))))))))))) (qblock va_mods (fun (va_s:va_state) -> va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 886 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rRbx)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 887 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rRbp)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 888 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rRdi)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 889 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rRsi)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 890 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rR12)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 891 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rR13)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 892 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rR14)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 893 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rR15)) (va_QEmpty (())))))))))))) (fun (va_s:va_state) va_g -> let (hash_in:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_old_s) ctx_b)) in let (input_LE:(FStar.Seq.Base.seq FStar.UInt8.t)) = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b)) in let (va_arg77:Vale.SHA.SHA_helpers.bytes) = input_LE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 898 column 51 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_opaque_vale_is_update_multi hash_in va_arg77) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 900 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_DestroyHeaplets ()) (va_QEmpty (())))))))))) [@"opaque_to_smt"] let va_lemma_Sha_update_bytes_stdcall va_b0 va_s0 win ctx_b in_b num_val k_b = let (va_mods:va_mods_t) = [va_Mod_stackTaint; va_Mod_stack; va_Mod_mem_layout; va_Mod_mem_heaplet 0; va_Mod_flags; va_Mod_xmm 15; va_Mod_xmm 14; va_Mod_xmm 13; va_Mod_xmm 12; va_Mod_xmm 11; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rR15; va_Mod_reg64 rR14; va_Mod_reg64 rR13; va_Mod_reg64 rR12; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9; va_Mod_reg64 rR8; va_Mod_reg64 rRsp; va_Mod_reg64 rRbp; va_Mod_reg64 rRdi; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Sha_update_bytes_stdcall va_mods win ctx_b in_b num_val k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Sha_update_bytes_stdcall win) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 735 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (let (ctx_ptr:(va_int_range 0 18446744073709551615)) = va_if win (fun _ -> va_get_reg64 rRcx va_s0) (fun _ -> va_get_reg64 rRdi va_s0) in let (in_ptr:(va_int_range 0 18446744073709551615)) = va_if win (fun _ -> va_get_reg64 rRdx va_s0) (fun _ -> va_get_reg64 rRsi va_s0) in let (num:(va_int_range 0 18446744073709551615)) = va_if win (fun _ -> va_get_reg64 rR8 va_s0) (fun _ -> va_get_reg64 rRdx va_s0) in let (k_ptr:(va_int_range 0 18446744073709551615)) = va_if win (fun _ -> va_get_reg64 rR9 va_s0) (fun _ -> va_get_reg64 rRcx va_s0) in label va_range1 "***** POSTCONDITION NOT MET AT line 776 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_in = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem va_s0) ctx_b)) in label va_range1 "***** POSTCONDITION NOT MET AT line 777 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_out = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem va_sM) ctx_b)) in label va_range1 "***** POSTCONDITION NOT MET AT line 781 column 102 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem va_sM) in_b)) in l_and (FStar.Seq.Base.length #FStar.UInt8.t input_LE `op_Modulus` 64 == 0) (hash_out == Vale.SHA.SHA_helpers.update_multi_transparent hash_in input_LE)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 784 column 55 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_mem (Vale.X64.Decls.loc_buffer #Vale.X64.Memory.vuint128 ctx_b) (va_get_mem va_s0) (va_get_mem va_sM)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 786 column 24 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsp va_sM == va_get_reg64 rRsp va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 788 column 33 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 789 column 33 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_reg64 rRbp va_sM == va_get_reg64 rRbp va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 790 column 33 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_reg64 rRdi va_sM == va_get_reg64 rRdi va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 791 column 33 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 792 column 33 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_reg64 rR12 va_sM == va_get_reg64 rR12 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 793 column 33 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_reg64 rR13 va_sM == va_get_reg64 rR13 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 794 column 33 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_reg64 rR14 va_sM == va_get_reg64 rR14 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 795 column 33 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_reg64 rR15 va_sM == va_get_reg64 rR15 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 796 column 34 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~win ==> va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 797 column 34 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~win ==> va_get_reg64 rRbp va_sM == va_get_reg64 rRbp va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 798 column 34 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~win ==> va_get_reg64 rR12 va_sM == va_get_reg64 rR12 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 799 column 34 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~win ==> va_get_reg64 rR13 va_sM == va_get_reg64 rR13 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 800 column 34 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~win ==> va_get_reg64 rR14 va_sM == va_get_reg64 rR14 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 801 column 34 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~win ==> va_get_reg64 rR15 va_sM == va_get_reg64 rR15 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 802 column 35 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_xmm 6 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 803 column 35 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_xmm 7 va_sM == va_get_xmm 7 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 804 column 35 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_xmm 8 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 805 column 35 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_xmm 9 va_sM == va_get_xmm 9 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 806 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_xmm 10 va_sM == va_get_xmm 10 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 807 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_xmm 11 va_sM == va_get_xmm 11 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 808 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_xmm 12 va_sM == va_get_xmm 12 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 809 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_xmm 13 va_sM == va_get_xmm 13 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 810 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_xmm 14 va_sM == va_get_xmm 14 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 811 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_xmm 15 va_sM == va_get_xmm 15 va_s0))))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_stackTaint; va_Mod_stack; va_Mod_mem_layout; va_Mod_mem_heaplet 0; va_Mod_flags; va_Mod_xmm 15; va_Mod_xmm 14; va_Mod_xmm 13; va_Mod_xmm 12; va_Mod_xmm 11; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rR15; va_Mod_reg64 rR14; va_Mod_reg64 rR13; va_Mod_reg64 rR12; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9; va_Mod_reg64 rR8; va_Mod_reg64 rRsp; va_Mod_reg64 rRbp; va_Mod_reg64 rRdi; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM)
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 80, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_wpProof_Sha_update_bytes_stdcall : win:bool -> ctx_b:buffer128 -> in_b:buffer128 -> num_val:nat64 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Sha_update_bytes_stdcall win ctx_b in_b num_val k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Sha_update_bytes_stdcall win) ([va_Mod_stackTaint; va_Mod_stack; va_Mod_mem_layout; va_Mod_mem_heaplet 0; va_Mod_flags; va_Mod_xmm 15; va_Mod_xmm 14; va_Mod_xmm 13; va_Mod_xmm 12; va_Mod_xmm 11; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rR15; va_Mod_reg64 rR14; va_Mod_reg64 rR13; va_Mod_reg64 rR12; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9; va_Mod_reg64 rR8; va_Mod_reg64 rRsp; va_Mod_reg64 rRbp; va_Mod_reg64 rRdi; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g))))
[]
Vale.SHA.X64.va_wpProof_Sha_update_bytes_stdcall
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
win: Prims.bool -> ctx_b: Vale.X64.Memory.buffer128 -> in_b: Vale.X64.Memory.buffer128 -> num_val: Vale.X64.Memory.nat64 -> k_b: Vale.X64.Memory.buffer128 -> va_s0: Vale.X64.Decls.va_state -> va_k: (_: Vale.X64.Decls.va_state -> _: Prims.unit -> Type0) -> Prims.Ghost ((Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel) * Prims.unit)
{ "end_col": 22, "end_line": 2931, "start_col": 79, "start_line": 2905 }
Prims.Ghost
val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM)
val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) let va_lemma_Msg_shift va_b0 va_s0 =
false
null
false
let va_mods:va_mods_t = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let va_sM, va_fM, va_g = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([ va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok ]) va_sM va_s0; (va_sM, va_fM)
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[]
[ "Vale.X64.Decls.va_code", "Vale.X64.Decls.va_state", "Vale.X64.QuickCodes.fuel", "Prims.unit", "FStar.Pervasives.Native.Mktuple2", "Vale.X64.Decls.va_fuel", "Vale.X64.QuickCode.va_lemma_norm_mods", "Prims.Cons", "Vale.X64.QuickCode.mod_t", "Vale.X64.QuickCode.va_Mod_xmm", "Vale.X64.QuickCode.va_Mod_ok", "Prims.Nil", "FStar.Pervasives.assert_norm", "Prims.eq2", "Prims.list", "Vale.X64.QuickCode.__proj__QProc__item__mods", "Vale.SHA.X64.va_code_Msg_shift", "FStar.Pervasives.Native.tuple2", "FStar.Pervasives.Native.tuple3", "Vale.X64.State.vale_state", "Vale.X64.QuickCodes.va_wp_sound_code_norm", "Prims.l_and", "Vale.X64.QuickCodes.label", "Vale.X64.QuickCodes.va_range1", "Prims.b2t", "Vale.X64.Decls.va_get_ok", "Vale.X64.Decls.quad32", "Vale.X64.Decls.va_get_xmm", "Vale.X64.QuickCode.quickCode", "Vale.SHA.X64.va_qcode_Msg_shift" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))))
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))))
[]
Vale.SHA.X64.va_lemma_Msg_shift
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_b0: Vale.X64.Decls.va_code -> va_s0: Vale.X64.Decls.va_state -> Prims.Ghost (Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel)
{ "end_col": 16, "end_line": 838, "start_col": 36, "start_line": 819 }
Prims.Ghost
val va_lemma_Epilogue : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Epilogue ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_lemma_Epilogue va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Epilogue va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Epilogue ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 583 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 603 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 606 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM)
val va_lemma_Epilogue : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Epilogue ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))) let va_lemma_Epilogue va_b0 va_s0 ctx_b =
false
null
false
let va_mods:va_mods_t = [ va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem ] in let va_qc = va_qcode_Epilogue va_mods ctx_b in let va_sM, va_fM, va_g = va_wp_sound_code_norm (va_code_Epilogue ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 583 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 603 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 606 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([ va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem ]) va_sM va_s0; (va_sM, va_fM)
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[]
[ "Vale.X64.Decls.va_code", "Vale.X64.Decls.va_state", "Vale.X64.Memory.buffer128", "Vale.X64.QuickCodes.fuel", "Prims.unit", "FStar.Pervasives.Native.Mktuple2", "Vale.X64.Decls.va_fuel", "Vale.X64.QuickCode.va_lemma_norm_mods", "Prims.Cons", "Vale.X64.QuickCode.mod_t", "Vale.X64.QuickCode.va_Mod_flags", "Vale.X64.QuickCode.va_Mod_mem_heaplet", "Vale.X64.QuickCode.va_Mod_xmm", "Vale.X64.QuickCode.va_Mod_ok", "Vale.X64.QuickCode.va_Mod_mem", "Prims.Nil", "FStar.Pervasives.assert_norm", "Prims.eq2", "Prims.list", "Vale.X64.QuickCode.__proj__QProc__item__mods", "Vale.SHA.X64.va_code_Epilogue", "FStar.Pervasives.Native.tuple2", "FStar.Pervasives.Native.tuple3", "Vale.X64.State.vale_state", "Vale.X64.QuickCodes.va_wp_sound_code_norm", "Prims.l_and", "Vale.X64.QuickCodes.label", "Vale.X64.QuickCodes.va_range1", "Prims.b2t", "Vale.X64.Decls.va_get_ok", "Vale.Def.Words_s.four", "Vale.Def.Types_s.nat32", "Vale.X64.Decls.buffer128_read", "Vale.X64.Decls.va_get_mem_heaplet", "Vale.SHA.SHA_helpers.hash256", "Vale.SHA.SHA_helpers.make_hash", "Vale.X64.Decls.va_get_xmm", "Vale.SHA.SHA_helpers.make_ordered_hash", "Vale.Def.Words_s.nat32", "Vale.Def.Words_s.Mkfour", "Vale.Def.Words_s.__proj__Mkfour__item__lo1", "Vale.Def.Words_s.__proj__Mkfour__item__lo0", "Vale.Def.Words_s.__proj__Mkfour__item__hi3", "Vale.Def.Words_s.__proj__Mkfour__item__hi2", "Vale.X64.Decls.modifies_buffer128", "Vale.X64.QuickCode.quickCode", "Vale.SHA.X64.va_qcode_Epilogue" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ()))) val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_body0 () = (va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_body0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 578 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds in_b k_b (count `op_Multiply` 4) hash_orig) (fun (va_s:va_state) _ -> let (count:nat) = count + 1 in va_QEmpty ((count))))) val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_body0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_body0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_body0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 576 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0 /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_body0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_body0 (va_code_Loop_body0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_body0 ())) = (va_QProc (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop_while0 val va_code_Loop_while0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_while0 () = (va_Block (va_CCons (va_While (va_cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (va_Block (va_CCons (va_code_Loop_body0 ()) (va_CNil ())))) (va_CNil ()))) val va_codegen_success_Loop_while0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_while0 () = (va_pbool_and (va_codegen_success_Loop_body0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_while0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_while0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qWhile va_mods (Cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (fun va_g -> let (count:nat) = let count = va_g in count in qblock va_mods (fun (va_s:va_state) -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_body0 va_old hash_orig in_b k_b count) (fun (va_s:va_state) (count:nat) -> va_QEmpty ((count))))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_ok va_s /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRsi va_old) in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRcx va_s) k_b 16 (va_get_mem_layout va_s) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_s == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_reg64 rRdx va_s) ((count))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in let va_g = (count) in let (count:nat) = va_g in va_QEmpty ((count))))) val va_lemma_Loop_while0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_while0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig))) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_while0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_while0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_while0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~(va_get_reg64 rRdx va_sM > 0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_while0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_while0 (va_code_Loop_while0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_while0 ())) = (va_QProc (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop val va_code_Loop : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop () = (va_Block (va_CCons (va_code_Loop_while0 ()) (va_CNil ()))) val va_codegen_success_Loop : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop () = (va_pbool_and (va_codegen_success_Loop_while0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (count:nat) = 0 in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 556 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_while0 va_old_s hash_orig in_b k_b count) (fun (va_s:va_state) count -> va_QEmpty (())))) val va_lemma_Loop : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop va_b0 va_s0 in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop va_mods in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 547 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 548 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == 0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 551 column 90 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) ==> va_k va_sM (()))) val va_wpProof_Loop : in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop (va_code_Loop ()) va_s0 in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (va_QProc (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop in_b k_b) (va_wpProof_Loop in_b k_b)) //-- //-- Epilogue val va_code_Epilogue : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Epilogue () = (va_Block (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_CNil ()))))))))) val va_codegen_success_Epilogue : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Epilogue () = (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_ttrue ())))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Epilogue (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Epilogue ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 612 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 613 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 614 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 616 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 617 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 619 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret ctx_b 0) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 620 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret ctx_b 1) (fun (va_s:va_state) _ -> let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 623 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_old_s) (va_get_xmm 2 va_old_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))) val va_lemma_Epilogue : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Epilogue ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))))
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_lemma_Epilogue : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Epilogue ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))))
[]
Vale.SHA.X64.va_lemma_Epilogue
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_b0: Vale.X64.Decls.va_code -> va_s0: Vale.X64.Decls.va_state -> ctx_b: Vale.X64.Memory.buffer128 -> Prims.Ghost (Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel)
{ "end_col": 16, "end_line": 2124, "start_col": 41, "start_line": 2101 }
Prims.Ghost
val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g))))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) let va_wpProof_Msg_shift va_s0 va_k =
false
null
false
let va_sM, va_f0 = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))) ); va_lemma_norm_mods ([ va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3 ]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[]
[ "Vale.X64.Decls.va_state", "Prims.unit", "Vale.X64.Decls.va_fuel", "FStar.Pervasives.Native.Mktuple3", "Vale.X64.QuickCode.va_lemma_norm_mods", "Prims.Cons", "Vale.X64.QuickCode.mod_t", "Vale.X64.QuickCode.va_Mod_xmm", "Prims.Nil", "Prims._assert", "Vale.X64.Decls.va_state_eq", "Vale.X64.Decls.va_update_xmm", "Vale.X64.Decls.va_update_ok", "Vale.X64.Decls.va_lemma_upd_update", "FStar.Pervasives.Native.tuple3", "FStar.Pervasives.Native.tuple2", "Vale.X64.State.vale_state", "Vale.SHA.X64.va_lemma_Msg_shift", "Vale.SHA.X64.va_code_Msg_shift" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g))))
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g))))
[]
Vale.SHA.X64.va_wpProof_Msg_shift
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_s0: Vale.X64.Decls.va_state -> va_k: (_: Vale.X64.Decls.va_state -> _: Prims.unit -> Type0) -> Prims.Ghost ((Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel) * Prims.unit)
{ "end_col": 22, "end_line": 866, "start_col": 37, "start_line": 857 }
Prims.Tot
val va_quick_Loop_rounds_52_64 (k_b: buffer128) (block: block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ()))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block))
val va_quick_Loop_rounds_52_64 (k_b: buffer128) (block: block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) let va_quick_Loop_rounds_52_64 (k_b: buffer128) (block: block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) =
false
null
false
(va_QProc (va_code_Loop_rounds_52_64 ()) ([ va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx ]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Vale.X64.Memory.buffer128", "Vale.SHA.SHA_helpers.block_w", "Vale.X64.QuickCode.va_QProc", "Prims.unit", "Vale.SHA.X64.va_code_Loop_rounds_52_64", "Prims.Cons", "Vale.X64.QuickCode.mod_t", "Vale.X64.QuickCode.va_Mod_flags", "Vale.X64.QuickCode.va_Mod_xmm", "Vale.X64.QuickCode.va_Mod_reg64", "Vale.X64.Machine_s.rRdx", "Prims.Nil", "Vale.SHA.X64.va_wp_Loop_rounds_52_64", "Vale.SHA.X64.va_wpProof_Loop_rounds_52_64", "Vale.X64.QuickCode.va_quickCode" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_quick_Loop_rounds_52_64 (k_b: buffer128) (block: block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ()))
[]
Vale.SHA.X64.va_quick_Loop_rounds_52_64
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
k_b: Vale.X64.Memory.buffer128 -> block: Vale.SHA.SHA_helpers.block_w -> Vale.X64.QuickCode.va_quickCode Prims.unit (Vale.SHA.X64.va_code_Loop_rounds_52_64 ())
{ "end_col": 81, "end_line": 1311, "start_col": 2, "start_line": 1309 }
Prims.Tot
val va_wp_Epilogue (ctx_b: buffer128) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_wp_Epilogue (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_mem:vale_heap) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_heap0:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_mem va_x_mem va_s0))))) in va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) ==> va_k va_sM (())))
val va_wp_Epilogue (ctx_b: buffer128) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0 let va_wp_Epilogue (ctx_b: buffer128) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0 =
false
null
false
(va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_mem: vale_heap) (va_x_xmm1: quad32) (va_x_xmm2: quad32) (va_x_xmm7: quad32) (va_x_heap0: vale_heap) (va_x_efl: Vale.X64.Flags.t). let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_mem va_x_mem va_s0))))) in va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) ==> va_k va_sM (())))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Vale.X64.Memory.buffer128", "Vale.X64.Decls.va_state", "Prims.unit", "Prims.l_and", "Prims.b2t", "Vale.X64.Decls.va_get_ok", "Vale.X64.CPU_Features_s.sse_enabled", "Vale.X64.Decls.validDstAddrs128", "Vale.X64.Decls.va_get_mem_heaplet", "Vale.X64.Decls.va_get_reg64", "Vale.X64.Machine_s.rRdi", "Vale.X64.Decls.va_get_mem_layout", "Vale.Arch.HeapTypes_s.Secret", "Prims.l_Forall", "Vale.X64.InsBasic.vale_heap", "Vale.X64.Decls.quad32", "Vale.X64.Flags.t", "Prims.l_imp", "Prims.eq2", "Vale.Def.Words_s.four", "Vale.Def.Types_s.nat32", "Vale.X64.Decls.buffer128_read", "Vale.SHA.SHA_helpers.hash256", "Vale.SHA.SHA_helpers.make_hash", "Vale.X64.Decls.va_get_xmm", "Vale.SHA.SHA_helpers.make_ordered_hash", "Vale.Def.Words_s.nat32", "Vale.Def.Words_s.Mkfour", "Vale.Def.Words_s.__proj__Mkfour__item__lo1", "Vale.Def.Words_s.__proj__Mkfour__item__lo0", "Vale.Def.Words_s.__proj__Mkfour__item__hi3", "Vale.Def.Words_s.__proj__Mkfour__item__hi2", "Vale.X64.Decls.modifies_buffer128", "Vale.X64.State.vale_state", "Vale.X64.Decls.va_upd_flags", "Vale.X64.Decls.va_upd_mem_heaplet", "Vale.X64.Decls.va_upd_xmm", "Vale.X64.Decls.va_upd_mem" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ()))) val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_body0 () = (va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_body0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 578 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds in_b k_b (count `op_Multiply` 4) hash_orig) (fun (va_s:va_state) _ -> let (count:nat) = count + 1 in va_QEmpty ((count))))) val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_body0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_body0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_body0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 576 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0 /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_body0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_body0 (va_code_Loop_body0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_body0 ())) = (va_QProc (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop_while0 val va_code_Loop_while0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_while0 () = (va_Block (va_CCons (va_While (va_cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (va_Block (va_CCons (va_code_Loop_body0 ()) (va_CNil ())))) (va_CNil ()))) val va_codegen_success_Loop_while0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_while0 () = (va_pbool_and (va_codegen_success_Loop_body0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_while0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_while0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qWhile va_mods (Cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (fun va_g -> let (count:nat) = let count = va_g in count in qblock va_mods (fun (va_s:va_state) -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_body0 va_old hash_orig in_b k_b count) (fun (va_s:va_state) (count:nat) -> va_QEmpty ((count))))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_ok va_s /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRsi va_old) in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRcx va_s) k_b 16 (va_get_mem_layout va_s) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_s == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_reg64 rRdx va_s) ((count))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in let va_g = (count) in let (count:nat) = va_g in va_QEmpty ((count))))) val va_lemma_Loop_while0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_while0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig))) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_while0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_while0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_while0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~(va_get_reg64 rRdx va_sM > 0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_while0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_while0 (va_code_Loop_while0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_while0 ())) = (va_QProc (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop val va_code_Loop : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop () = (va_Block (va_CCons (va_code_Loop_while0 ()) (va_CNil ()))) val va_codegen_success_Loop : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop () = (va_pbool_and (va_codegen_success_Loop_while0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (count:nat) = 0 in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 556 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_while0 va_old_s hash_orig in_b k_b count) (fun (va_s:va_state) count -> va_QEmpty (())))) val va_lemma_Loop : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop va_b0 va_s0 in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop va_mods in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 547 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 548 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == 0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 551 column 90 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) ==> va_k va_sM (()))) val va_wpProof_Loop : in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop (va_code_Loop ()) va_s0 in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (va_QProc (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop in_b k_b) (va_wpProof_Loop in_b k_b)) //-- //-- Epilogue val va_code_Epilogue : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Epilogue () = (va_Block (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_CNil ()))))))))) val va_codegen_success_Epilogue : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Epilogue () = (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_ttrue ())))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Epilogue (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Epilogue ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 612 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 613 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 614 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 616 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 617 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 619 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret ctx_b 0) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 620 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret ctx_b 1) (fun (va_s:va_state) _ -> let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 623 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_old_s) (va_get_xmm 2 va_old_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))) val va_lemma_Epilogue : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Epilogue ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Epilogue va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Epilogue va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Epilogue ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 583 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 603 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 606 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr]
false
true
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_wp_Epilogue (ctx_b: buffer128) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0
[]
Vale.SHA.X64.va_wp_Epilogue
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
ctx_b: Vale.X64.Memory.buffer128 -> va_s0: Vale.X64.Decls.va_state -> va_k: (_: Vale.X64.Decls.va_state -> _: Prims.unit -> Type0) -> Type0
{ "end_col": 84, "end_line": 2142, "start_col": 2, "start_line": 2128 }
Prims.Ghost
val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g))))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k =
false
null
false
let va_sM, va_f0 = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([ va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi ]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[]
[ "Vale.X64.Memory.buffer128", "Prims.nat", "Vale.X64.Decls.va_state", "Prims.unit", "Vale.X64.Decls.va_fuel", "FStar.Pervasives.Native.Mktuple3", "Vale.X64.QuickCode.va_lemma_norm_mods", "Prims.Cons", "Vale.X64.QuickCode.mod_t", "Vale.X64.QuickCode.va_Mod_flags", "Vale.X64.QuickCode.va_Mod_xmm", "Vale.X64.QuickCode.va_Mod_reg64", "Vale.X64.Machine_s.rRsi", "Prims.Nil", "Prims._assert", "Vale.X64.Decls.va_state_eq", "Vale.X64.Decls.va_update_flags", "Vale.X64.Decls.va_update_xmm", "Vale.X64.Decls.va_update_reg64", "Vale.X64.Decls.va_update_ok", "Vale.X64.Decls.va_lemma_upd_update", "FStar.Pervasives.Native.tuple3", "FStar.Pervasives.Native.tuple2", "Vale.X64.State.vale_state", "Vale.SHA.X64.va_lemma_Loop_rounds_0_15", "Vale.SHA.X64.va_code_Loop_rounds_0_15" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g))))
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g))))
[]
Vale.SHA.X64.va_wpProof_Loop_rounds_0_15
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
in_b: Vale.X64.Memory.buffer128 -> k_b: Vale.X64.Memory.buffer128 -> offset: Prims.nat -> va_s0: Vale.X64.Decls.va_state -> va_k: (_: Vale.X64.Decls.va_state -> _: Prims.unit -> Type0) -> Prims.Ghost ((Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel) * Prims.unit)
{ "end_col": 22, "end_line": 580, "start_col": 60, "start_line": 568 }
Prims.Tot
val va_qcode_Sha_update_bytes_stdcall (va_mods: va_mods_t) (win: bool) (ctx_b in_b: buffer128) (num_val: nat64) (k_b: buffer128) : (va_quickCode unit (va_code_Sha_update_bytes_stdcall win))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_qcode_Sha_update_bytes_stdcall (va_mods:va_mods_t) (win:bool) (ctx_b:buffer128) (in_b:buffer128) (num_val:nat64) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update_bytes_stdcall win)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ctx_ptr:(va_int_range 0 18446744073709551615)) = va_if win (fun _ -> va_get_reg64 rRcx va_s) (fun _ -> va_get_reg64 rRdi va_s) in let (in_ptr:(va_int_range 0 18446744073709551615)) = va_if win (fun _ -> va_get_reg64 rRdx va_s) (fun _ -> va_get_reg64 rRsi va_s) in let (num:(va_int_range 0 18446744073709551615)) = va_if win (fun _ -> va_get_reg64 rR8 va_s) (fun _ -> va_get_reg64 rRdx va_s) in let (k_ptr:(va_int_range 0 18446744073709551615)) = va_if win (fun _ -> va_get_reg64 rR9 va_s) (fun _ -> va_get_reg64 rRcx va_s) in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 813 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_CreateHeaplets ([declare_buffer128 in_b 0 Secret Immutable; declare_buffer128 k_b 0 Secret Immutable; declare_buffer128 ctx_b 0 Secret Mutable])) (fun (va_s:va_state) _ -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 819 column 15 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qInlineIf va_mods win (qblock va_mods (fun (va_s:va_state) -> va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 821 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PushXmm_Secret (va_op_xmm_xmm 15) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 822 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PushXmm_Secret (va_op_xmm_xmm 14) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 823 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PushXmm_Secret (va_op_xmm_xmm 13) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 824 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PushXmm_Secret (va_op_xmm_xmm 12) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 825 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PushXmm_Secret (va_op_xmm_xmm 11) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 826 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PushXmm_Secret (va_op_xmm_xmm 10) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 827 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PushXmm_Secret (va_op_xmm_xmm 9) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 828 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PushXmm_Secret (va_op_xmm_xmm 8) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 829 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PushXmm_Secret (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 830 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PushXmm_Secret (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 831 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rR15)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 832 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rR14)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 833 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rR13)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 834 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rR12)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 835 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rRsi)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 836 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rRdi)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 837 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rRbp)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 838 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rRbx)) (va_QEmpty (()))))))))))))))))))))) (qblock va_mods (fun (va_s:va_state) -> va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 842 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rR15)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 843 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rR14)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 844 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rR13)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 845 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rR12)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 846 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rRsi)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 847 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rRdi)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 848 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rRbp)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 849 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rRbx)) (va_QEmpty (())))))))))))) (fun (va_s:va_state) va_g -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 852 column 15 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qInlineIf va_mods win (qblock va_mods (fun (va_s:va_state) -> va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 854 column 14 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov64 (va_op_dst_opr64_reg64 rRdi) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 855 column 14 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov64 (va_op_dst_opr64_reg64 rRsi) (va_op_opr64_reg64 rRdx)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 856 column 14 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov64 (va_op_dst_opr64_reg64 rRdx) (va_op_opr64_reg64 rR8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 857 column 14 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))) (qblock va_mods (fun (va_s:va_state) -> va_QEmpty (())))) (fun (va_s:va_state) va_g -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 860 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sha_update_bytes ctx_b in_b k_b) (fun (va_s:va_state) _ -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 863 column 15 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qInlineIf va_mods win (qblock va_mods (fun (va_s:va_state) -> va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 864 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rRbx)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 865 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rRbp)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 866 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rRdi)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 867 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rRsi)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 868 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rR12)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 869 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rR13)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 870 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rR14)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 871 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rR15)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 873 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PopXmm_Secret (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRax) (va_get_xmm 6 va_old_s)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 874 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PopXmm_Secret (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax) (va_get_xmm 7 va_old_s)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 875 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PopXmm_Secret (va_op_xmm_xmm 8) (va_op_reg_opr64_reg64 rRax) (va_get_xmm 8 va_old_s)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 876 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PopXmm_Secret (va_op_xmm_xmm 9) (va_op_reg_opr64_reg64 rRax) (va_get_xmm 9 va_old_s)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 877 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PopXmm_Secret (va_op_xmm_xmm 10) (va_op_reg_opr64_reg64 rRax) (va_get_xmm 10 va_old_s)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 878 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PopXmm_Secret (va_op_xmm_xmm 11) (va_op_reg_opr64_reg64 rRax) (va_get_xmm 11 va_old_s)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 879 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PopXmm_Secret (va_op_xmm_xmm 12) (va_op_reg_opr64_reg64 rRax) (va_get_xmm 12 va_old_s)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 880 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PopXmm_Secret (va_op_xmm_xmm 13) (va_op_reg_opr64_reg64 rRax) (va_get_xmm 13 va_old_s)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 881 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PopXmm_Secret (va_op_xmm_xmm 14) (va_op_reg_opr64_reg64 rRax) (va_get_xmm 14 va_old_s)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 882 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PopXmm_Secret (va_op_xmm_xmm 15) (va_op_reg_opr64_reg64 rRax) (va_get_xmm 15 va_old_s)) (va_QEmpty (()))))))))))))))))))))) (qblock va_mods (fun (va_s:va_state) -> va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 886 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rRbx)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 887 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rRbp)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 888 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rRdi)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 889 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rRsi)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 890 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rR12)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 891 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rR13)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 892 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rR14)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 893 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rR15)) (va_QEmpty (())))))))))))) (fun (va_s:va_state) va_g -> let (hash_in:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_old_s) ctx_b)) in let (input_LE:(FStar.Seq.Base.seq FStar.UInt8.t)) = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b)) in let (va_arg77:Vale.SHA.SHA_helpers.bytes) = input_LE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 898 column 51 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_opaque_vale_is_update_multi hash_in va_arg77) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 900 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_DestroyHeaplets ()) (va_QEmpty (()))))))))))
val va_qcode_Sha_update_bytes_stdcall (va_mods: va_mods_t) (win: bool) (ctx_b in_b: buffer128) (num_val: nat64) (k_b: buffer128) : (va_quickCode unit (va_code_Sha_update_bytes_stdcall win)) let va_qcode_Sha_update_bytes_stdcall (va_mods: va_mods_t) (win: bool) (ctx_b in_b: buffer128) (num_val: nat64) (k_b: buffer128) : (va_quickCode unit (va_code_Sha_update_bytes_stdcall win)) =
false
null
false
(qblock va_mods (fun (va_s: va_state) -> let va_old_s:va_state = va_s in let ctx_ptr:(va_int_range 0 18446744073709551615) = va_if win (fun _ -> va_get_reg64 rRcx va_s) (fun _ -> va_get_reg64 rRdi va_s) in let in_ptr:(va_int_range 0 18446744073709551615) = va_if win (fun _ -> va_get_reg64 rRdx va_s) (fun _ -> va_get_reg64 rRsi va_s) in let num:(va_int_range 0 18446744073709551615) = va_if win (fun _ -> va_get_reg64 rR8 va_s) (fun _ -> va_get_reg64 rRdx va_s) in let k_ptr:(va_int_range 0 18446744073709551615) = va_if win (fun _ -> va_get_reg64 rR9 va_s) (fun _ -> va_get_reg64 rRcx va_s) in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 813 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_CreateHeaplets ([ declare_buffer128 in_b 0 Secret Immutable; declare_buffer128 k_b 0 Secret Immutable; declare_buffer128 ctx_b 0 Secret Mutable ])) (fun (va_s: va_state) _ -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 819 column 15 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qInlineIf va_mods win (qblock va_mods (fun (va_s: va_state) -> va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 821 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PushXmm_Secret (va_op_xmm_xmm 15) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 822 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PushXmm_Secret (va_op_xmm_xmm 14) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 823 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PushXmm_Secret (va_op_xmm_xmm 13) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 824 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PushXmm_Secret (va_op_xmm_xmm 12) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 825 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PushXmm_Secret (va_op_xmm_xmm 11) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 826 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PushXmm_Secret (va_op_xmm_xmm 10) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 827 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PushXmm_Secret (va_op_xmm_xmm 9) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 828 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PushXmm_Secret (va_op_xmm_xmm 8) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 829 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PushXmm_Secret (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 830 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PushXmm_Secret (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 831 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rR15)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 832 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rR14)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 833 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret ( va_op_reg_opr64_reg64 rR13)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 834 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rR12)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 835 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rRsi)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 836 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rRdi )) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 837 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rRbp )) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 838 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret ( va_op_reg_opr64_reg64 rRbx ) ) (va_QEmpty ( () ) )) )))))))))) )))))))) (qblock va_mods (fun (va_s: va_state) -> va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 842 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rR15)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 843 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rR14)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 844 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rR13)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 845 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rR12)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 846 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rRsi)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 847 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rRdi) ) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 848 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rRbp )) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 849 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rRbx)) (va_QEmpty (())))))))))))) (fun (va_s: va_state) va_g -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 852 column 15 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qInlineIf va_mods win (qblock va_mods (fun (va_s: va_state) -> va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 854 column 14 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov64 (va_op_dst_opr64_reg64 rRdi) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 855 column 14 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov64 (va_op_dst_opr64_reg64 rRsi) (va_op_opr64_reg64 rRdx)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 856 column 14 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov64 (va_op_dst_opr64_reg64 rRdx) (va_op_opr64_reg64 rR8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 857 column 14 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))) (qblock va_mods (fun (va_s: va_state) -> va_QEmpty (())))) (fun (va_s: va_state) va_g -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 860 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sha_update_bytes ctx_b in_b k_b) (fun (va_s: va_state) _ -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 863 column 15 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qInlineIf va_mods win (qblock va_mods (fun (va_s: va_state) -> va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 864 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rRbx)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 865 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rRbp )) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 866 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rRdi )) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 867 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rRsi)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 868 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rR12)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 869 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rR13)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 870 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rR14)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 871 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rR15)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 873 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PopXmm_Secret (va_op_xmm_xmm 6 ) (va_op_reg_opr64_reg64 rRax) (va_get_xmm 6 va_old_s)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 874 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PopXmm_Secret (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax) (va_get_xmm 7 va_old_s )) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 875 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PopXmm_Secret (va_op_xmm_xmm 8) (va_op_reg_opr64_reg64 rRax ) (va_get_xmm 8 va_old_s )) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 876 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PopXmm_Secret (va_op_xmm_xmm 9 ) (va_op_reg_opr64_reg64 rRax ) (va_get_xmm 9 va_old_s )) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 877 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PopXmm_Secret ( va_op_xmm_xmm 10 ) ( va_op_reg_opr64_reg64 rRax ) ( va_get_xmm 10 va_old_s ) ) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 878 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_quick_PopXmm_Secret ( va_op_xmm_xmm 11 ) ( va_op_reg_opr64_reg64 rRax ) ( va_get_xmm 11 va_old_s ) ) ( va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 879 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_quick_PopXmm_Secret ( va_op_xmm_xmm 12 ) ( va_op_reg_opr64_reg64 rRax ) ( va_get_xmm 12 va_old_s ) ) ( va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 880 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_quick_PopXmm_Secret ( va_op_xmm_xmm 13 ) ( va_op_reg_opr64_reg64 rRax ) ( va_get_xmm 13 va_old_s ) ) ( va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 881 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_quick_PopXmm_Secret ( va_op_xmm_xmm 14 ) ( va_op_reg_opr64_reg64 rRax ) ( va_get_xmm 14 va_old_s ) ) ( va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 882 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_quick_PopXmm_Secret ( va_op_xmm_xmm 15 ) ( va_op_reg_opr64_reg64 rRax ) ( va_get_xmm 15 va_old_s ) ) ( va_QEmpty ( () ) ) ) ) ) ) )) )))))))))))) ) (qblock va_mods (fun (va_s: va_state) -> va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 886 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rRbx)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 887 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rRbp )) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 888 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rRdi )) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 889 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rRsi)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 890 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rR12)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 891 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rR13)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 892 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rR14)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 893 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rR15)) (va_QEmpty (())))))))))) )) (fun (va_s: va_state) va_g -> let hash_in:Vale.SHA.SHA_helpers.hash256 = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_old_s) ctx_b)) in let input_LE:(FStar.Seq.Base.seq FStar.UInt8.t) = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b)) in let va_arg77:Vale.SHA.SHA_helpers.bytes = input_LE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 898 column 51 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_: unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_opaque_vale_is_update_multi hash_in va_arg77) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 900 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_DestroyHeaplets ()) (va_QEmpty (()))))))))))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Vale.X64.QuickCode.va_mods_t", "Prims.bool", "Vale.X64.Memory.buffer128", "Vale.X64.Memory.nat64", "Vale.X64.QuickCodes.qblock", "Prims.unit", "Prims.Cons", "Vale.X64.Decls.va_code", "Vale.X64.InsMem.va_code_CreateHeaplets", "Vale.X64.QuickCodes.if_code", "Vale.X64.QuickCodes.block", "Vale.X64.InsStack.va_code_PushXmm_Secret", "Vale.X64.Decls.va_op_xmm_xmm", "Vale.X64.Decls.va_op_reg_opr64_reg64", "Vale.X64.Machine_s.rRax", "Vale.X64.InsStack.va_code_Push_Secret", "Vale.X64.Machine_s.rR15", "Vale.X64.Machine_s.rR14", "Vale.X64.Machine_s.rR13", "Vale.X64.Machine_s.rR12", "Vale.X64.Machine_s.rRsi", "Vale.X64.Machine_s.rRdi", "Vale.X64.Machine_s.rRbp", "Vale.X64.Machine_s.rRbx", "Prims.Nil", "Vale.X64.Machine_s.precode", "Vale.X64.Decls.ins", "Vale.X64.Decls.ocmp", "Vale.X64.InsBasic.va_code_Mov64", "Vale.X64.Decls.va_op_dst_opr64_reg64", "Vale.X64.Decls.va_op_opr64_reg64", "Vale.X64.Machine_s.rRcx", "Vale.X64.Machine_s.rRdx", "Vale.X64.Machine_s.rR8", "Vale.X64.Machine_s.rR9", "Vale.SHA.X64.va_code_Sha_update_bytes", "Vale.X64.InsStack.va_code_Pop_Secret", "Vale.X64.InsStack.va_code_PopXmm_Secret", "Vale.X64.InsMem.va_code_DestroyHeaplets", "Vale.X64.Decls.va_state", "Vale.X64.QuickCodes.va_QBind", "Vale.X64.QuickCodes.va_range1", "Vale.X64.InsMem.va_quick_CreateHeaplets", "Vale.Arch.HeapImpl.buffer_info", "Vale.X64.InsMem.declare_buffer128", "Vale.Arch.HeapTypes_s.Secret", "Vale.Arch.HeapImpl.Immutable", "Vale.Arch.HeapImpl.Mutable", "Vale.X64.QuickCodes.va_qInlineIf", "Vale.X64.QuickCodes.va_QSeq", "Vale.X64.InsStack.va_quick_PushXmm_Secret", "Vale.X64.InsStack.va_quick_Push_Secret", "Vale.X64.QuickCodes.va_QEmpty", "Vale.X64.QuickCodes.quickCodes", "Vale.X64.InsBasic.va_quick_Mov64", "Vale.SHA.X64.va_quick_Sha_update_bytes", "Vale.X64.InsStack.va_quick_Pop_Secret", "Vale.X64.InsStack.va_quick_PopXmm_Secret", "Vale.X64.Decls.va_get_xmm", "Vale.X64.QuickCodes.va_qPURE", "Prims.pure_post", "Prims.l_and", "Prims.b2t", "Prims.op_Equality", "Prims.int", "Prims.op_Modulus", "FStar.Seq.Base.length", "Vale.SHA.SHA_helpers.byte", "Prims.l_Forall", "Prims.l_imp", "Prims.eq2", "Vale.SHA.SHA_helpers.hash256", "Vale.SHA.SHA_helpers.update_multi_opaque_vale", "Vale.SHA.SHA_helpers.update_multi_transparent", "Vale.SHA.SHA_helpers.lemma_update_multi_opaque_vale_is_update_multi", "Vale.X64.InsMem.va_quick_DestroyHeaplets", "Vale.SHA.SHA_helpers.bytes", "FStar.Seq.Base.seq", "FStar.UInt8.t", "Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8", "Vale.Def.Types_s.le_seq_quad32_to_bytes", "Vale.X64.Decls.buffer128_as_seq", "Vale.X64.Decls.va_get_mem_heaplet", "Vale.SHA.SHA_helpers.le_bytes_to_hash", "Vale.X64.Decls.va_int_range", "Vale.X64.Decls.va_if", "Vale.Def.Types_s.nat64", "Vale.X64.Decls.va_get_reg64", "Prims.l_not", "Vale.X64.State.vale_state", "Vale.X64.QuickCode.va_quickCode", "Vale.SHA.X64.va_code_Sha_update_bytes_stdcall" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ()))) val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_body0 () = (va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_body0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 578 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds in_b k_b (count `op_Multiply` 4) hash_orig) (fun (va_s:va_state) _ -> let (count:nat) = count + 1 in va_QEmpty ((count))))) val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_body0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_body0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_body0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 576 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0 /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_body0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_body0 (va_code_Loop_body0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_body0 ())) = (va_QProc (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop_while0 val va_code_Loop_while0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_while0 () = (va_Block (va_CCons (va_While (va_cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (va_Block (va_CCons (va_code_Loop_body0 ()) (va_CNil ())))) (va_CNil ()))) val va_codegen_success_Loop_while0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_while0 () = (va_pbool_and (va_codegen_success_Loop_body0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_while0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_while0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qWhile va_mods (Cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (fun va_g -> let (count:nat) = let count = va_g in count in qblock va_mods (fun (va_s:va_state) -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_body0 va_old hash_orig in_b k_b count) (fun (va_s:va_state) (count:nat) -> va_QEmpty ((count))))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_ok va_s /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRsi va_old) in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRcx va_s) k_b 16 (va_get_mem_layout va_s) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_s == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_reg64 rRdx va_s) ((count))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in let va_g = (count) in let (count:nat) = va_g in va_QEmpty ((count))))) val va_lemma_Loop_while0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_while0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig))) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_while0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_while0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_while0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~(va_get_reg64 rRdx va_sM > 0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_while0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_while0 (va_code_Loop_while0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_while0 ())) = (va_QProc (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop val va_code_Loop : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop () = (va_Block (va_CCons (va_code_Loop_while0 ()) (va_CNil ()))) val va_codegen_success_Loop : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop () = (va_pbool_and (va_codegen_success_Loop_while0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (count:nat) = 0 in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 556 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_while0 va_old_s hash_orig in_b k_b count) (fun (va_s:va_state) count -> va_QEmpty (())))) val va_lemma_Loop : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop va_b0 va_s0 in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop va_mods in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 547 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 548 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == 0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 551 column 90 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) ==> va_k va_sM (()))) val va_wpProof_Loop : in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop (va_code_Loop ()) va_s0 in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (va_QProc (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop in_b k_b) (va_wpProof_Loop in_b k_b)) //-- //-- Epilogue val va_code_Epilogue : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Epilogue () = (va_Block (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_CNil ()))))))))) val va_codegen_success_Epilogue : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Epilogue () = (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_ttrue ())))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Epilogue (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Epilogue ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 612 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 613 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 614 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 616 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 617 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 619 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret ctx_b 0) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 620 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret ctx_b 1) (fun (va_s:va_state) _ -> let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 623 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_old_s) (va_get_xmm 2 va_old_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))) val va_lemma_Epilogue : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Epilogue ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Epilogue va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Epilogue va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Epilogue ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 583 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 603 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 606 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Epilogue (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_mem:vale_heap) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_heap0:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_mem va_x_mem va_s0))))) in va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) ==> va_k va_sM (()))) val va_wpProof_Epilogue : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Epilogue ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Epilogue ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Epilogue ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Epilogue (va_code_Epilogue ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Epilogue (ctx_b:buffer128) : (va_quickCode unit (va_code_Epilogue ())) = (va_QProc (va_code_Epilogue ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) (va_wp_Epilogue ctx_b) (va_wpProof_Epilogue ctx_b)) //-- //-- Sha_update val va_code_Sha_update : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Sha_update () = (va_Block (va_CCons (va_code_Preamble ()) (va_CCons (va_code_Loop ()) (va_CCons (va_code_Epilogue ()) (va_CNil ()))))) val va_codegen_success_Sha_update : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Sha_update () = (va_pbool_and (va_codegen_success_Preamble ()) (va_pbool_and (va_codegen_success_Loop ()) (va_pbool_and (va_codegen_success_Epilogue ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Sha_update (va_mods:va_mods_t) (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 667 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Preamble ctx_b) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 668 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop in_b k_b) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 669 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Epilogue ctx_b) (va_QEmpty (())))))) val va_lemma_Sha_update : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Sha_update ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))))))))))))))) [@"opaque_to_smt"] let va_lemma_Sha_update va_b0 va_s0 ctx_b in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Sha_update va_mods ctx_b in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Sha_update ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 627 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 653 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 662 column 103 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 665 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Sha_update (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_mem:vale_heap) (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_heap0:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi (va_upd_mem va_x_mem va_s0)))))))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) ==> va_k va_sM (()))) val va_wpProof_Sha_update : ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Sha_update ctx_b in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Sha_update ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Sha_update ctx_b in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Sha_update (va_code_Sha_update ()) va_s0 ctx_b in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Sha_update (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update ())) = (va_QProc (va_code_Sha_update ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) (va_wp_Sha_update ctx_b in_b k_b) (va_wpProof_Sha_update ctx_b in_b k_b)) //-- //-- Sha_update_bytes #push-options "--z3rlimit 80" #restart-solver val va_code_Sha_update_bytes : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Sha_update_bytes () = (va_Block (va_CCons (va_code_Sha_update ()) (va_CCons (va_Block (va_CNil ())) (va_CNil ())))) val va_codegen_success_Sha_update_bytes : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Sha_update_bytes () = (va_pbool_and (va_codegen_success_Sha_update ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Sha_update_bytes (va_mods:va_mods_t) (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update_bytes ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 714 column 15 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sha_update ctx_b in_b k_b) (fun (va_s:va_state) _ -> let (old_ctx:(seq (four nat32))) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_old_s) ctx_b in let (new_ctx:(seq (four nat32))) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) ctx_b in let (va_arg34:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = old_ctx in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 717 column 24 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_hash_to_bytes va_arg34) (let (va_arg33:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = new_ctx in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 718 column 24 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_hash_to_bytes va_arg33) (let (hash_in:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes old_ctx) in let (hash_out:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes new_ctx) in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 728 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_old_s)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_old_s) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 730 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (hash_out == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_in) (let (va_arg32:(FStar.Seq.Base.seq Vale.SHA.SHA_helpers.byte)) = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes input_LE) in let (va_arg31:(FStar.Seq.Base.seq Vale.Def.Words_s.nat8)) = Vale.Def.Types_s.le_seq_quad32_to_bytes input_LE in let (va_arg30:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = input_LE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 731 column 34 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_equiv_vale hash_in hash_out va_arg30 input_BE va_arg31 va_arg32) (va_QEmpty (()))))))))) val va_lemma_Sha_update_bytes : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Sha_update_bytes ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 ctx_b == 2 /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 in_b == 4 `op_Multiply` va_get_reg64 rRdx va_s0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let hash_in = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) ctx_b)) in let hash_out = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) ctx_b)) in (let input_LE = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b)) in l_and (FStar.Seq.Base.length #FStar.UInt8.t input_LE `op_Modulus` 64 == 0) (hash_out == Vale.SHA.SHA_helpers.update_multi_opaque_vale hash_in input_LE)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))))))))))))))) [@"opaque_to_smt"] let va_lemma_Sha_update_bytes va_b0 va_s0 ctx_b in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Sha_update_bytes va_mods ctx_b in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Sha_update_bytes ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 672 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 702 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 704 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_in = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) ctx_b)) in label va_range1 "***** POSTCONDITION NOT MET AT line 705 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_out = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) ctx_b)) in label va_range1 "***** POSTCONDITION NOT MET AT line 709 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b)) in l_and (FStar.Seq.Base.length #FStar.UInt8.t input_LE `op_Modulus` 64 == 0) (hash_out == Vale.SHA.SHA_helpers.update_multi_opaque_vale hash_in input_LE)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 712 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Sha_update_bytes (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 ctx_b == 2 /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 in_b == 4 `op_Multiply` va_get_reg64 rRdx va_s0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_mem:vale_heap) (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_heap0:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi (va_upd_mem va_x_mem va_s0)))))))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let hash_in = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) ctx_b)) in let hash_out = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) ctx_b)) in (let input_LE = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b)) in l_and (FStar.Seq.Base.length #FStar.UInt8.t input_LE `op_Modulus` 64 == 0) (hash_out == Vale.SHA.SHA_helpers.update_multi_opaque_vale hash_in input_LE)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM))) ==> va_k va_sM (()))) val va_wpProof_Sha_update_bytes : ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Sha_update_bytes ctx_b in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Sha_update_bytes ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Sha_update_bytes ctx_b in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Sha_update_bytes (va_code_Sha_update_bytes ()) va_s0 ctx_b in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Sha_update_bytes (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update_bytes ())) = (va_QProc (va_code_Sha_update_bytes ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) (va_wp_Sha_update_bytes ctx_b in_b k_b) (va_wpProof_Sha_update_bytes ctx_b in_b k_b)) #pop-options //-- //-- Sha_update_bytes_stdcall #push-options "--z3rlimit 80" #restart-solver [@ "opaque_to_smt" va_qattr] let va_code_Sha_update_bytes_stdcall win = (va_Block (va_CCons (va_code_CreateHeaplets ()) (va_CCons (if win then va_Block (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 15) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 14) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 13) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 12) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 11) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 10) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 9) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 8) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR15)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR14)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR13)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR12)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRsi)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRdi)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRbp)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRbx)) (va_CNil ()))))))))))))))))))) else va_Block (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR15)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR14)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR13)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR12)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRsi)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRdi)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRbp)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRbx)) (va_CNil ())))))))))) (va_CCons (if win then va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRdi) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRsi) (va_op_opr64_reg64 rRdx)) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRdx) (va_op_opr64_reg64 rR8)) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))) else va_Block (va_CNil ())) (va_CCons (va_code_Sha_update_bytes ()) (va_CCons (if win then va_Block (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRbx)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRbp)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRdi)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRsi)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR12)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR13)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR14)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR15)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 8) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 9) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 10) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 11) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 12) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 13) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 14) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 15) (va_op_reg_opr64_reg64 rRax)) (va_CNil ()))))))))))))))))))) else va_Block (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRbx)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRbp)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRdi)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRsi)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR12)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR13)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR14)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR15)) (va_CNil ())))))))))) (va_CCons (va_code_DestroyHeaplets ()) (va_CNil ())))))))) [@ "opaque_to_smt" va_qattr] let va_codegen_success_Sha_update_bytes_stdcall win = (va_pbool_and (va_codegen_success_CreateHeaplets ()) (va_pbool_and (if win then va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 15) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 14) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 13) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 12) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 11) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 10) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 9) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 8) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rR15)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rR14)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rR13)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rR12)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rRsi)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rRdi)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rRbp)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rRbx)) (va_ttrue ())))))))))))))))))) else va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rR15)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rR14)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rR13)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rR12)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rRsi)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rRdi)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rRbp)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rRbx)) (va_ttrue ()))))))))) (va_pbool_and (if win then va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRdi) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRsi) (va_op_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRdx) (va_op_opr64_reg64 rR8)) (va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))) else va_ttrue ()) (va_pbool_and (va_codegen_success_Sha_update_bytes ()) (va_pbool_and (if win then va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rRbp)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rRdi)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rRsi)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rR12)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rR13)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rR14)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rR15)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 8) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 9) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 10) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 11) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 12) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 13) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 14) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 15) (va_op_reg_opr64_reg64 rRax)) (va_ttrue ())))))))))))))))))) else va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rRbp)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rRdi)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rRsi)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rR12)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rR13)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rR14)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rR15)) (va_ttrue ()))))))))) (va_pbool_and (va_codegen_success_DestroyHeaplets ()) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Sha_update_bytes_stdcall (va_mods:va_mods_t) (win:bool) (ctx_b:buffer128) (in_b:buffer128) (num_val:nat64) (k_b:buffer128) : (va_quickCode unit
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 80, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_qcode_Sha_update_bytes_stdcall (va_mods: va_mods_t) (win: bool) (ctx_b in_b: buffer128) (num_val: nat64) (k_b: buffer128) : (va_quickCode unit (va_code_Sha_update_bytes_stdcall win))
[]
Vale.SHA.X64.va_qcode_Sha_update_bytes_stdcall
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_mods: Vale.X64.QuickCode.va_mods_t -> win: Prims.bool -> ctx_b: Vale.X64.Memory.buffer128 -> in_b: Vale.X64.Memory.buffer128 -> num_val: Vale.X64.Memory.nat64 -> k_b: Vale.X64.Memory.buffer128 -> Vale.X64.QuickCode.va_quickCode Prims.unit (Vale.SHA.X64.va_code_Sha_update_bytes_stdcall win)
{ "end_col": 58, "end_line": 2803, "start_col": 2, "start_line": 2647 }
Prims.Ghost
val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g))))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k =
false
null
false
let va_sM, va_f0 = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([ va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0 ]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[]
[ "Prims.nat", "Vale.X64.Memory.buffer128", "Vale.SHA.SHA_helpers.block_w", "Vale.SHA.SHA_helpers.hash256", "Vale.X64.Decls.va_state", "Prims.unit", "Vale.X64.Decls.va_fuel", "FStar.Pervasives.Native.Mktuple3", "Vale.X64.QuickCode.va_lemma_norm_mods", "Prims.Cons", "Vale.X64.QuickCode.mod_t", "Vale.X64.QuickCode.va_Mod_flags", "Vale.X64.QuickCode.va_Mod_xmm", "Prims.Nil", "Prims._assert", "Vale.X64.Decls.va_state_eq", "Vale.X64.Decls.va_update_flags", "Vale.X64.Decls.va_update_xmm", "Vale.X64.Decls.va_update_ok", "Vale.X64.Decls.va_lemma_upd_update", "FStar.Pervasives.Native.tuple3", "FStar.Pervasives.Native.tuple2", "Vale.X64.State.vale_state", "Vale.SHA.X64.va_lemma_Loop_rounds_16_51_body", "Vale.SHA.X64.va_code_Loop_rounds_16_51_body" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g))))
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g))))
[]
Vale.SHA.X64.va_wpProof_Loop_rounds_16_51_body
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
i: Prims.nat -> k_b: Vale.X64.Memory.buffer128 -> block: Vale.SHA.SHA_helpers.block_w -> hash_orig: Vale.SHA.SHA_helpers.hash256 -> va_s0: Vale.X64.Decls.va_state -> va_k: (_: Vale.X64.Decls.va_state -> _: Prims.unit -> Type0) -> Prims.Ghost ((Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel) * Prims.unit)
{ "end_col": 22, "end_line": 761, "start_col": 72, "start_line": 751 }
Prims.Tot
val va_code_Sha_update_bytes : va_dummy:unit -> Tot va_code
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_code_Sha_update_bytes () = (va_Block (va_CCons (va_code_Sha_update ()) (va_CCons (va_Block (va_CNil ())) (va_CNil ()))))
val va_code_Sha_update_bytes : va_dummy:unit -> Tot va_code let va_code_Sha_update_bytes () =
false
null
false
(va_Block (va_CCons (va_code_Sha_update ()) (va_CCons (va_Block (va_CNil ())) (va_CNil ()))))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Prims.unit", "Vale.X64.Decls.va_Block", "Vale.X64.Decls.va_CCons", "Vale.SHA.X64.va_code_Sha_update", "Vale.X64.Decls.va_CNil", "Vale.X64.Decls.va_code" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ()))) val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_body0 () = (va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_body0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 578 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds in_b k_b (count `op_Multiply` 4) hash_orig) (fun (va_s:va_state) _ -> let (count:nat) = count + 1 in va_QEmpty ((count))))) val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_body0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_body0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_body0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 576 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0 /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_body0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_body0 (va_code_Loop_body0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_body0 ())) = (va_QProc (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop_while0 val va_code_Loop_while0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_while0 () = (va_Block (va_CCons (va_While (va_cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (va_Block (va_CCons (va_code_Loop_body0 ()) (va_CNil ())))) (va_CNil ()))) val va_codegen_success_Loop_while0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_while0 () = (va_pbool_and (va_codegen_success_Loop_body0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_while0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_while0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qWhile va_mods (Cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (fun va_g -> let (count:nat) = let count = va_g in count in qblock va_mods (fun (va_s:va_state) -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_body0 va_old hash_orig in_b k_b count) (fun (va_s:va_state) (count:nat) -> va_QEmpty ((count))))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_ok va_s /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRsi va_old) in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRcx va_s) k_b 16 (va_get_mem_layout va_s) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_s == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_reg64 rRdx va_s) ((count))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in let va_g = (count) in let (count:nat) = va_g in va_QEmpty ((count))))) val va_lemma_Loop_while0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_while0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig))) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_while0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_while0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_while0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~(va_get_reg64 rRdx va_sM > 0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_while0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_while0 (va_code_Loop_while0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_while0 ())) = (va_QProc (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop val va_code_Loop : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop () = (va_Block (va_CCons (va_code_Loop_while0 ()) (va_CNil ()))) val va_codegen_success_Loop : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop () = (va_pbool_and (va_codegen_success_Loop_while0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (count:nat) = 0 in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 556 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_while0 va_old_s hash_orig in_b k_b count) (fun (va_s:va_state) count -> va_QEmpty (())))) val va_lemma_Loop : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop va_b0 va_s0 in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop va_mods in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 547 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 548 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == 0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 551 column 90 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) ==> va_k va_sM (()))) val va_wpProof_Loop : in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop (va_code_Loop ()) va_s0 in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (va_QProc (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop in_b k_b) (va_wpProof_Loop in_b k_b)) //-- //-- Epilogue val va_code_Epilogue : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Epilogue () = (va_Block (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_CNil ()))))))))) val va_codegen_success_Epilogue : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Epilogue () = (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_ttrue ())))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Epilogue (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Epilogue ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 612 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 613 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 614 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 616 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 617 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 619 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret ctx_b 0) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 620 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret ctx_b 1) (fun (va_s:va_state) _ -> let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 623 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_old_s) (va_get_xmm 2 va_old_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))) val va_lemma_Epilogue : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Epilogue ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Epilogue va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Epilogue va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Epilogue ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 583 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 603 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 606 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Epilogue (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_mem:vale_heap) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_heap0:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_mem va_x_mem va_s0))))) in va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) ==> va_k va_sM (()))) val va_wpProof_Epilogue : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Epilogue ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Epilogue ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Epilogue ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Epilogue (va_code_Epilogue ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Epilogue (ctx_b:buffer128) : (va_quickCode unit (va_code_Epilogue ())) = (va_QProc (va_code_Epilogue ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) (va_wp_Epilogue ctx_b) (va_wpProof_Epilogue ctx_b)) //-- //-- Sha_update val va_code_Sha_update : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Sha_update () = (va_Block (va_CCons (va_code_Preamble ()) (va_CCons (va_code_Loop ()) (va_CCons (va_code_Epilogue ()) (va_CNil ()))))) val va_codegen_success_Sha_update : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Sha_update () = (va_pbool_and (va_codegen_success_Preamble ()) (va_pbool_and (va_codegen_success_Loop ()) (va_pbool_and (va_codegen_success_Epilogue ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Sha_update (va_mods:va_mods_t) (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 667 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Preamble ctx_b) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 668 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop in_b k_b) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 669 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Epilogue ctx_b) (va_QEmpty (())))))) val va_lemma_Sha_update : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Sha_update ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))))))))))))))) [@"opaque_to_smt"] let va_lemma_Sha_update va_b0 va_s0 ctx_b in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Sha_update va_mods ctx_b in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Sha_update ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 627 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 653 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 662 column 103 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 665 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Sha_update (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_mem:vale_heap) (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_heap0:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi (va_upd_mem va_x_mem va_s0)))))))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) ==> va_k va_sM (()))) val va_wpProof_Sha_update : ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Sha_update ctx_b in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Sha_update ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Sha_update ctx_b in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Sha_update (va_code_Sha_update ()) va_s0 ctx_b in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Sha_update (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update ())) = (va_QProc (va_code_Sha_update ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) (va_wp_Sha_update ctx_b in_b k_b) (va_wpProof_Sha_update ctx_b in_b k_b)) //-- //-- Sha_update_bytes #push-options "--z3rlimit 80" #restart-solver val va_code_Sha_update_bytes : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr]
false
true
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 80, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_code_Sha_update_bytes : va_dummy:unit -> Tot va_code
[]
Vale.SHA.X64.va_code_Sha_update_bytes
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_dummy: Prims.unit -> Vale.X64.Decls.va_code
{ "end_col": 95, "end_line": 2333, "start_col": 2, "start_line": 2333 }
Prims.Tot
val va_wp_Loop_rounds (in_b k_b: buffer128) (offset: nat) (hash_orig: hash256) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (())))
val va_wp_Loop_rounds (in_b k_b: buffer128) (offset: nat) (hash_orig: hash256) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0 let va_wp_Loop_rounds (in_b k_b: buffer128) (offset: nat) (hash_orig: hash256) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0 =
false
null
false
(va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi: nat64) (va_x_rdx: nat64) (va_x_xmm0: quad32) (va_x_xmm1: quad32) (va_x_xmm2: quad32) (va_x_xmm3: quad32) (va_x_xmm4: quad32) (va_x_xmm5: quad32) (va_x_xmm6: quad32) (va_x_xmm7: quad32) (va_x_xmm9: quad32) (va_x_xmm10: quad32) (va_x_efl: Vale.X64.Flags.t). let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (())))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Vale.X64.Memory.buffer128", "Prims.nat", "Vale.SHA.SHA_helpers.hash256", "Vale.X64.Decls.va_state", "Prims.unit", "Prims.l_and", "Prims.b2t", "Vale.X64.Decls.va_get_ok", "Vale.X64.CPU_Features_s.sha_enabled", "Vale.X64.CPU_Features_s.sse_enabled", "Vale.X64.Decls.validSrcAddrsOffset128", "Vale.X64.Decls.va_get_mem_heaplet", "Vale.X64.Decls.va_get_reg64", "Vale.X64.Machine_s.rRsi", "Vale.X64.Decls.va_get_mem_layout", "Vale.Arch.HeapTypes_s.Secret", "Vale.X64.Decls.validSrcAddrs128", "Vale.X64.Machine_s.rRcx", "Prims.op_LessThan", "Prims.op_Addition", "Vale.X64.Machine_s.pow2_64", "Prims.op_GreaterThan", "Vale.X64.Machine_s.rRdx", "Prims.eq2", "Vale.Def.Words_s.four", "Vale.Def.Types_s.nat32", "Vale.X64.Decls.va_get_xmm", "Vale.Def.Words_s.Mkfour", "Vale.SHA.SHA_helpers.k_reqs", "Vale.X64.Decls.buffer128_as_seq", "Vale.SHA.SHA_helpers.make_hash", "Vale.SHA.SHA_helpers.update_multi_quads", "FStar.Seq.Base.seq", "Vale.Def.Types_s.quad32", "Vale.Arch.Types.reverse_bytes_nat32_quad32_seq", "FStar.Seq.Base.slice", "Vale.X64.Decls.quad32", "Prims.l_Forall", "Vale.X64.Memory.nat64", "Vale.X64.Flags.t", "Prims.l_imp", "Prims.int", "Prims.op_Subtraction", "Vale.X64.State.vale_state", "Vale.X64.Decls.va_upd_flags", "Vale.X64.Decls.va_upd_xmm", "Vale.X64.Decls.va_upd_reg64" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256)
false
true
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_wp_Loop_rounds (in_b k_b: buffer128) (offset: nat) (hash_orig: hash256) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0
[]
Vale.SHA.X64.va_wp_Loop_rounds
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
in_b: Vale.X64.Memory.buffer128 -> k_b: Vale.X64.Memory.buffer128 -> offset: Prims.nat -> hash_orig: Vale.SHA.SHA_helpers.hash256 -> va_s0: Vale.X64.Decls.va_state -> va_k: (_: Vale.X64.Decls.va_state -> _: Prims.unit -> Type0) -> Type0
{ "end_col": 37, "end_line": 1452, "start_col": 2, "start_line": 1425 }
Prims.Tot
val va_codegen_success_Sha_update_bytes : va_dummy:unit -> Tot va_pbool
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_codegen_success_Sha_update_bytes () = (va_pbool_and (va_codegen_success_Sha_update ()) (va_ttrue ()))
val va_codegen_success_Sha_update_bytes : va_dummy:unit -> Tot va_pbool let va_codegen_success_Sha_update_bytes () =
false
null
false
(va_pbool_and (va_codegen_success_Sha_update ()) (va_ttrue ()))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Prims.unit", "Vale.X64.Decls.va_pbool_and", "Vale.SHA.X64.va_codegen_success_Sha_update", "Vale.X64.Decls.va_ttrue", "Vale.X64.Decls.va_pbool" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ()))) val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_body0 () = (va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_body0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 578 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds in_b k_b (count `op_Multiply` 4) hash_orig) (fun (va_s:va_state) _ -> let (count:nat) = count + 1 in va_QEmpty ((count))))) val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_body0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_body0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_body0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 576 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0 /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_body0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_body0 (va_code_Loop_body0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_body0 ())) = (va_QProc (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop_while0 val va_code_Loop_while0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_while0 () = (va_Block (va_CCons (va_While (va_cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (va_Block (va_CCons (va_code_Loop_body0 ()) (va_CNil ())))) (va_CNil ()))) val va_codegen_success_Loop_while0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_while0 () = (va_pbool_and (va_codegen_success_Loop_body0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_while0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_while0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qWhile va_mods (Cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (fun va_g -> let (count:nat) = let count = va_g in count in qblock va_mods (fun (va_s:va_state) -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_body0 va_old hash_orig in_b k_b count) (fun (va_s:va_state) (count:nat) -> va_QEmpty ((count))))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_ok va_s /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRsi va_old) in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRcx va_s) k_b 16 (va_get_mem_layout va_s) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_s == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_reg64 rRdx va_s) ((count))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in let va_g = (count) in let (count:nat) = va_g in va_QEmpty ((count))))) val va_lemma_Loop_while0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_while0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig))) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_while0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_while0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_while0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~(va_get_reg64 rRdx va_sM > 0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_while0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_while0 (va_code_Loop_while0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_while0 ())) = (va_QProc (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop val va_code_Loop : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop () = (va_Block (va_CCons (va_code_Loop_while0 ()) (va_CNil ()))) val va_codegen_success_Loop : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop () = (va_pbool_and (va_codegen_success_Loop_while0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (count:nat) = 0 in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 556 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_while0 va_old_s hash_orig in_b k_b count) (fun (va_s:va_state) count -> va_QEmpty (())))) val va_lemma_Loop : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop va_b0 va_s0 in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop va_mods in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 547 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 548 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == 0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 551 column 90 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) ==> va_k va_sM (()))) val va_wpProof_Loop : in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop (va_code_Loop ()) va_s0 in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (va_QProc (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop in_b k_b) (va_wpProof_Loop in_b k_b)) //-- //-- Epilogue val va_code_Epilogue : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Epilogue () = (va_Block (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_CNil ()))))))))) val va_codegen_success_Epilogue : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Epilogue () = (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_ttrue ())))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Epilogue (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Epilogue ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 612 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 613 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 614 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 616 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 617 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 619 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret ctx_b 0) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 620 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret ctx_b 1) (fun (va_s:va_state) _ -> let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 623 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_old_s) (va_get_xmm 2 va_old_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))) val va_lemma_Epilogue : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Epilogue ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Epilogue va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Epilogue va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Epilogue ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 583 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 603 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 606 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Epilogue (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_mem:vale_heap) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_heap0:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_mem va_x_mem va_s0))))) in va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) ==> va_k va_sM (()))) val va_wpProof_Epilogue : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Epilogue ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Epilogue ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Epilogue ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Epilogue (va_code_Epilogue ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Epilogue (ctx_b:buffer128) : (va_quickCode unit (va_code_Epilogue ())) = (va_QProc (va_code_Epilogue ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) (va_wp_Epilogue ctx_b) (va_wpProof_Epilogue ctx_b)) //-- //-- Sha_update val va_code_Sha_update : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Sha_update () = (va_Block (va_CCons (va_code_Preamble ()) (va_CCons (va_code_Loop ()) (va_CCons (va_code_Epilogue ()) (va_CNil ()))))) val va_codegen_success_Sha_update : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Sha_update () = (va_pbool_and (va_codegen_success_Preamble ()) (va_pbool_and (va_codegen_success_Loop ()) (va_pbool_and (va_codegen_success_Epilogue ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Sha_update (va_mods:va_mods_t) (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 667 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Preamble ctx_b) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 668 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop in_b k_b) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 669 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Epilogue ctx_b) (va_QEmpty (())))))) val va_lemma_Sha_update : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Sha_update ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))))))))))))))) [@"opaque_to_smt"] let va_lemma_Sha_update va_b0 va_s0 ctx_b in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Sha_update va_mods ctx_b in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Sha_update ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 627 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 653 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 662 column 103 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 665 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Sha_update (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_mem:vale_heap) (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_heap0:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi (va_upd_mem va_x_mem va_s0)))))))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) ==> va_k va_sM (()))) val va_wpProof_Sha_update : ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Sha_update ctx_b in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Sha_update ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Sha_update ctx_b in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Sha_update (va_code_Sha_update ()) va_s0 ctx_b in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Sha_update (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update ())) = (va_QProc (va_code_Sha_update ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) (va_wp_Sha_update ctx_b in_b k_b) (va_wpProof_Sha_update ctx_b in_b k_b)) //-- //-- Sha_update_bytes #push-options "--z3rlimit 80" #restart-solver val va_code_Sha_update_bytes : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Sha_update_bytes () = (va_Block (va_CCons (va_code_Sha_update ()) (va_CCons (va_Block (va_CNil ())) (va_CNil ())))) val va_codegen_success_Sha_update_bytes : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr]
false
true
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 80, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_codegen_success_Sha_update_bytes : va_dummy:unit -> Tot va_pbool
[]
Vale.SHA.X64.va_codegen_success_Sha_update_bytes
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_dummy: Prims.unit -> Vale.X64.Decls.va_pbool
{ "end_col": 65, "end_line": 2338, "start_col": 2, "start_line": 2338 }
Prims.Ghost
val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g))))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k =
false
null
false
let va_sM, va_f0 = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([ va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi ]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[]
[ "Vale.X64.Memory.buffer128", "Prims.nat", "Vale.SHA.SHA_helpers.hash256", "Vale.X64.Decls.va_state", "Prims.unit", "Vale.X64.Decls.va_fuel", "FStar.Pervasives.Native.Mktuple3", "Vale.X64.QuickCode.va_lemma_norm_mods", "Prims.Cons", "Vale.X64.QuickCode.mod_t", "Vale.X64.QuickCode.va_Mod_flags", "Vale.X64.QuickCode.va_Mod_xmm", "Vale.X64.QuickCode.va_Mod_reg64", "Vale.X64.Machine_s.rRdx", "Vale.X64.Machine_s.rRsi", "Prims.Nil", "Prims._assert", "Vale.X64.Decls.va_state_eq", "Vale.X64.Decls.va_update_flags", "Vale.X64.Decls.va_update_xmm", "Vale.X64.Decls.va_update_reg64", "Vale.X64.Decls.va_update_ok", "Vale.X64.Decls.va_lemma_upd_update", "FStar.Pervasives.Native.tuple3", "FStar.Pervasives.Native.tuple2", "Vale.X64.State.vale_state", "Vale.SHA.X64.va_lemma_Loop_rounds", "Vale.SHA.X64.va_code_Loop_rounds" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g))))
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g))))
[]
Vale.SHA.X64.va_wpProof_Loop_rounds
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
in_b: Vale.X64.Memory.buffer128 -> k_b: Vale.X64.Memory.buffer128 -> offset: Prims.nat -> hash_orig: Vale.SHA.SHA_helpers.hash256 -> va_s0: Vale.X64.Decls.va_state -> va_k: (_: Vale.X64.Decls.va_state -> _: Prims.unit -> Type0) -> Prims.Ghost ((Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel) * Prims.unit)
{ "end_col": 22, "end_line": 1477, "start_col": 65, "start_line": 1464 }
Prims.Tot
val va_wp_Sha_update_bytes (ctx_b in_b k_b: buffer128) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_wp_Sha_update_bytes (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 ctx_b == 2 /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 in_b == 4 `op_Multiply` va_get_reg64 rRdx va_s0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_mem:vale_heap) (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_heap0:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi (va_upd_mem va_x_mem va_s0)))))))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let hash_in = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) ctx_b)) in let hash_out = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) ctx_b)) in (let input_LE = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b)) in l_and (FStar.Seq.Base.length #FStar.UInt8.t input_LE `op_Modulus` 64 == 0) (hash_out == Vale.SHA.SHA_helpers.update_multi_opaque_vale hash_in input_LE)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM))) ==> va_k va_sM (())))
val va_wp_Sha_update_bytes (ctx_b in_b k_b: buffer128) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0 let va_wp_Sha_update_bytes (ctx_b in_b k_b: buffer128) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0 =
false
null
false
(va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` (va_get_reg64 rRdx va_s0)) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` (va_get_reg64 rRdx va_s0) < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 ctx_b == 2 /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 in_b == 4 `op_Multiply` (va_get_reg64 rRdx va_s0) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_mem: vale_heap) (va_x_rsi: nat64) (va_x_rdx: nat64) (va_x_rax: nat64) (va_x_xmm0: quad32) (va_x_xmm1: quad32) (va_x_xmm2: quad32) (va_x_xmm3: quad32) (va_x_xmm4: quad32) (va_x_xmm5: quad32) (va_x_xmm6: quad32) (va_x_xmm7: quad32) (va_x_xmm8: quad32) (va_x_xmm9: quad32) (va_x_xmm10: quad32) (va_x_heap0: vale_heap) (va_x_efl: Vale.X64.Flags.t). let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi (va_upd_mem va_x_mem va_s0)))) )))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` (va_get_reg64 rRdx va_s0) /\ (let hash_in = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) ctx_b)) in let hash_out = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) ctx_b)) in (let input_LE = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b)) in l_and ((FStar.Seq.Base.length #FStar.UInt8.t input_LE) `op_Modulus` 64 == 0) (hash_out == Vale.SHA.SHA_helpers.update_multi_opaque_vale hash_in input_LE)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM))) ==> va_k va_sM (())))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Vale.X64.Memory.buffer128", "Vale.X64.Decls.va_state", "Prims.unit", "Prims.l_and", "Prims.b2t", "Vale.X64.Decls.va_get_ok", "Vale.X64.CPU_Features_s.sha_enabled", "Vale.X64.CPU_Features_s.sse_enabled", "Vale.X64.Decls.validSrcAddrs128", "Vale.X64.Decls.va_get_mem_heaplet", "Vale.X64.Decls.va_get_reg64", "Vale.X64.Machine_s.rRsi", "Prims.op_Multiply", "Vale.X64.Machine_s.rRdx", "Vale.X64.Decls.va_get_mem_layout", "Vale.Arch.HeapTypes_s.Secret", "Vale.X64.Decls.validDstAddrs128", "Vale.X64.Machine_s.rRdi", "Vale.X64.Machine_s.rRcx", "Prims.op_LessThan", "Prims.op_Addition", "Vale.X64.Machine_s.pow2_64", "Vale.X64.Decls.buffers_disjoint128", "Prims.eq2", "Prims.int", "Vale.X64.Decls.buffer_length", "Vale.X64.Memory.vuint128", "Vale.SHA.SHA_helpers.k_reqs", "Vale.X64.Decls.buffer128_as_seq", "Prims.l_Forall", "Vale.X64.InsBasic.vale_heap", "Vale.X64.Memory.nat64", "Vale.X64.Decls.quad32", "Vale.X64.Flags.t", "Prims.l_imp", "Prims.op_Modulus", "FStar.Seq.Base.length", "FStar.UInt8.t", "Vale.SHA.SHA_helpers.hash256", "Vale.SHA.SHA_helpers.update_multi_opaque_vale", "FStar.Seq.Base.seq", "Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8", "Vale.Def.Types_s.le_seq_quad32_to_bytes", "Vale.X64.Decls.modifies_buffer128", "Vale.SHA.SHA_helpers.le_bytes_to_hash", "Vale.X64.State.vale_state", "Vale.X64.Decls.va_upd_flags", "Vale.X64.Decls.va_upd_mem_heaplet", "Vale.X64.Decls.va_upd_xmm", "Vale.X64.Decls.va_upd_reg64", "Vale.X64.Machine_s.rRax", "Vale.X64.Decls.va_upd_mem" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ()))) val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_body0 () = (va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_body0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 578 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds in_b k_b (count `op_Multiply` 4) hash_orig) (fun (va_s:va_state) _ -> let (count:nat) = count + 1 in va_QEmpty ((count))))) val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_body0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_body0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_body0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 576 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0 /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_body0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_body0 (va_code_Loop_body0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_body0 ())) = (va_QProc (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop_while0 val va_code_Loop_while0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_while0 () = (va_Block (va_CCons (va_While (va_cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (va_Block (va_CCons (va_code_Loop_body0 ()) (va_CNil ())))) (va_CNil ()))) val va_codegen_success_Loop_while0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_while0 () = (va_pbool_and (va_codegen_success_Loop_body0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_while0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_while0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qWhile va_mods (Cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (fun va_g -> let (count:nat) = let count = va_g in count in qblock va_mods (fun (va_s:va_state) -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_body0 va_old hash_orig in_b k_b count) (fun (va_s:va_state) (count:nat) -> va_QEmpty ((count))))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_ok va_s /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRsi va_old) in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRcx va_s) k_b 16 (va_get_mem_layout va_s) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_s == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_reg64 rRdx va_s) ((count))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in let va_g = (count) in let (count:nat) = va_g in va_QEmpty ((count))))) val va_lemma_Loop_while0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_while0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig))) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_while0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_while0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_while0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~(va_get_reg64 rRdx va_sM > 0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_while0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_while0 (va_code_Loop_while0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_while0 ())) = (va_QProc (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop val va_code_Loop : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop () = (va_Block (va_CCons (va_code_Loop_while0 ()) (va_CNil ()))) val va_codegen_success_Loop : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop () = (va_pbool_and (va_codegen_success_Loop_while0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (count:nat) = 0 in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 556 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_while0 va_old_s hash_orig in_b k_b count) (fun (va_s:va_state) count -> va_QEmpty (())))) val va_lemma_Loop : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop va_b0 va_s0 in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop va_mods in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 547 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 548 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == 0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 551 column 90 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) ==> va_k va_sM (()))) val va_wpProof_Loop : in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop (va_code_Loop ()) va_s0 in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (va_QProc (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop in_b k_b) (va_wpProof_Loop in_b k_b)) //-- //-- Epilogue val va_code_Epilogue : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Epilogue () = (va_Block (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_CNil ()))))))))) val va_codegen_success_Epilogue : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Epilogue () = (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_ttrue ())))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Epilogue (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Epilogue ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 612 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 613 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 614 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 616 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 617 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 619 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret ctx_b 0) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 620 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret ctx_b 1) (fun (va_s:va_state) _ -> let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 623 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_old_s) (va_get_xmm 2 va_old_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))) val va_lemma_Epilogue : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Epilogue ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Epilogue va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Epilogue va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Epilogue ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 583 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 603 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 606 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Epilogue (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_mem:vale_heap) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_heap0:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_mem va_x_mem va_s0))))) in va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) ==> va_k va_sM (()))) val va_wpProof_Epilogue : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Epilogue ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Epilogue ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Epilogue ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Epilogue (va_code_Epilogue ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Epilogue (ctx_b:buffer128) : (va_quickCode unit (va_code_Epilogue ())) = (va_QProc (va_code_Epilogue ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) (va_wp_Epilogue ctx_b) (va_wpProof_Epilogue ctx_b)) //-- //-- Sha_update val va_code_Sha_update : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Sha_update () = (va_Block (va_CCons (va_code_Preamble ()) (va_CCons (va_code_Loop ()) (va_CCons (va_code_Epilogue ()) (va_CNil ()))))) val va_codegen_success_Sha_update : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Sha_update () = (va_pbool_and (va_codegen_success_Preamble ()) (va_pbool_and (va_codegen_success_Loop ()) (va_pbool_and (va_codegen_success_Epilogue ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Sha_update (va_mods:va_mods_t) (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 667 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Preamble ctx_b) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 668 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop in_b k_b) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 669 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Epilogue ctx_b) (va_QEmpty (())))))) val va_lemma_Sha_update : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Sha_update ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))))))))))))))) [@"opaque_to_smt"] let va_lemma_Sha_update va_b0 va_s0 ctx_b in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Sha_update va_mods ctx_b in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Sha_update ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 627 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 653 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 662 column 103 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 665 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Sha_update (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_mem:vale_heap) (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_heap0:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi (va_upd_mem va_x_mem va_s0)))))))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) ==> va_k va_sM (()))) val va_wpProof_Sha_update : ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Sha_update ctx_b in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Sha_update ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Sha_update ctx_b in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Sha_update (va_code_Sha_update ()) va_s0 ctx_b in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Sha_update (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update ())) = (va_QProc (va_code_Sha_update ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) (va_wp_Sha_update ctx_b in_b k_b) (va_wpProof_Sha_update ctx_b in_b k_b)) //-- //-- Sha_update_bytes #push-options "--z3rlimit 80" #restart-solver val va_code_Sha_update_bytes : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Sha_update_bytes () = (va_Block (va_CCons (va_code_Sha_update ()) (va_CCons (va_Block (va_CNil ())) (va_CNil ())))) val va_codegen_success_Sha_update_bytes : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Sha_update_bytes () = (va_pbool_and (va_codegen_success_Sha_update ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Sha_update_bytes (va_mods:va_mods_t) (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update_bytes ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 714 column 15 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sha_update ctx_b in_b k_b) (fun (va_s:va_state) _ -> let (old_ctx:(seq (four nat32))) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_old_s) ctx_b in let (new_ctx:(seq (four nat32))) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) ctx_b in let (va_arg34:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = old_ctx in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 717 column 24 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_hash_to_bytes va_arg34) (let (va_arg33:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = new_ctx in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 718 column 24 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_hash_to_bytes va_arg33) (let (hash_in:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes old_ctx) in let (hash_out:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes new_ctx) in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 728 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_old_s)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_old_s) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 730 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (hash_out == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_in) (let (va_arg32:(FStar.Seq.Base.seq Vale.SHA.SHA_helpers.byte)) = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes input_LE) in let (va_arg31:(FStar.Seq.Base.seq Vale.Def.Words_s.nat8)) = Vale.Def.Types_s.le_seq_quad32_to_bytes input_LE in let (va_arg30:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = input_LE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 731 column 34 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_equiv_vale hash_in hash_out va_arg30 input_BE va_arg31 va_arg32) (va_QEmpty (()))))))))) val va_lemma_Sha_update_bytes : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Sha_update_bytes ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 ctx_b == 2 /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 in_b == 4 `op_Multiply` va_get_reg64 rRdx va_s0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let hash_in = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) ctx_b)) in let hash_out = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) ctx_b)) in (let input_LE = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b)) in l_and (FStar.Seq.Base.length #FStar.UInt8.t input_LE `op_Modulus` 64 == 0) (hash_out == Vale.SHA.SHA_helpers.update_multi_opaque_vale hash_in input_LE)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))))))))))))))) [@"opaque_to_smt"] let va_lemma_Sha_update_bytes va_b0 va_s0 ctx_b in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Sha_update_bytes va_mods ctx_b in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Sha_update_bytes ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 672 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 702 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 704 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_in = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) ctx_b)) in label va_range1 "***** POSTCONDITION NOT MET AT line 705 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_out = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) ctx_b)) in label va_range1 "***** POSTCONDITION NOT MET AT line 709 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b)) in l_and (FStar.Seq.Base.length #FStar.UInt8.t input_LE `op_Modulus` 64 == 0) (hash_out == Vale.SHA.SHA_helpers.update_multi_opaque_vale hash_in input_LE)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 712 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Sha_update_bytes (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) (va_s0:va_state)
false
true
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 80, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_wp_Sha_update_bytes (ctx_b in_b k_b: buffer128) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0
[]
Vale.SHA.X64.va_wp_Sha_update_bytes
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
ctx_b: Vale.X64.Memory.buffer128 -> in_b: Vale.X64.Memory.buffer128 -> k_b: Vale.X64.Memory.buffer128 -> va_s0: Vale.X64.Decls.va_state -> va_k: (_: Vale.X64.Decls.va_state -> _: Prims.unit -> Type0) -> Type0
{ "end_col": 34, "end_line": 2479, "start_col": 2, "start_line": 2450 }
Prims.Ghost
val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_lemma_Loop_body0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_body0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_body0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 576 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count)
val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) let va_lemma_Loop_body0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count =
false
null
false
let va_old = va_expand_state va_old in let va_mods:va_mods_t = [ va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags ] in let va_qc = va_qcode_Loop_body0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let va_sM, va_fM, va_g = va_wp_sound_code_norm (va_code_Loop_body0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` (va_get_reg64 rRdx va_old)) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` (va_get_reg64 rRdx va_old) < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 576 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([ va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags ]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count)
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[]
[ "Vale.X64.Decls.va_code", "Vale.X64.Decls.va_state", "Vale.SHA.SHA_helpers.hash256", "Vale.X64.Memory.buffer128", "Prims.nat", "Vale.X64.QuickCodes.fuel", "FStar.Pervasives.Native.Mktuple3", "Vale.X64.Decls.va_fuel", "Prims.unit", "Vale.X64.QuickCode.va_lemma_norm_mods", "Prims.Cons", "Vale.X64.QuickCode.mod_t", "Vale.X64.QuickCode.va_Mod_xmm", "Vale.X64.QuickCode.va_Mod_reg64", "Vale.X64.Machine_s.rRsi", "Vale.X64.Machine_s.rRdx", "Vale.X64.QuickCode.va_Mod_ok", "Vale.X64.QuickCode.va_Mod_flags", "Prims.Nil", "FStar.Pervasives.assert_norm", "Prims.eq2", "Prims.list", "Vale.X64.QuickCode.__proj__QProc__item__mods", "Vale.SHA.X64.va_code_Loop_body0", "FStar.Pervasives.Native.tuple3", "Vale.X64.State.vale_state", "Vale.X64.QuickCodes.va_wp_sound_code_norm", "Prims.l_and", "Vale.X64.QuickCodes.label", "Vale.X64.QuickCodes.va_range1", "Prims.b2t", "Vale.X64.Decls.va_get_ok", "Vale.X64.CPU_Features_s.sha_enabled", "Vale.X64.CPU_Features_s.sse_enabled", "Vale.X64.Decls.validSrcAddrs128", "Vale.X64.Decls.va_get_mem_heaplet", "Vale.X64.Decls.va_get_reg64", "Prims.op_Multiply", "Vale.X64.Decls.va_get_mem_layout", "Vale.Arch.HeapTypes_s.Secret", "Vale.X64.Machine_s.rRcx", "Prims.op_LessThan", "Prims.op_Addition", "Vale.X64.Machine_s.pow2_64", "Prims.int", "Prims.op_Subtraction", "Vale.Def.Words_s.four", "Vale.Def.Types_s.nat32", "Vale.X64.Decls.va_get_xmm", "Vale.Def.Words_s.Mkfour", "Vale.SHA.SHA_helpers.k_reqs", "Vale.X64.Decls.buffer128_as_seq", "Vale.SHA.SHA_helpers.make_hash", "Vale.SHA.SHA_helpers.update_multi_quads", "FStar.Seq.Base.seq", "Vale.Def.Types_s.quad32", "Vale.Arch.Types.reverse_bytes_nat32_quad32_seq", "FStar.Seq.Base.slice", "Vale.X64.Decls.quad32", "Vale.X64.QuickCodes.precedes_wrap", "Vale.Def.Types_s.nat64", "Vale.X64.QuickCode.quickCode", "Vale.SHA.X64.va_qcode_Loop_body0", "Vale.X64.Decls.va_expand_state" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ()))) val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_body0 () = (va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_body0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 578 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds in_b k_b (count `op_Multiply` 4) hash_orig) (fun (va_s:va_state) _ -> let (count:nat) = count + 1 in va_QEmpty ((count))))) val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))))
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))))
[]
Vale.SHA.X64.va_lemma_Loop_body0
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_b0: Vale.X64.Decls.va_code -> va_s0: Vale.X64.Decls.va_state -> va_old: Vale.X64.Decls.va_state -> va_in_hash_orig: Vale.SHA.SHA_helpers.hash256 -> va_in_in_b: Vale.X64.Memory.buffer128 -> va_in_k_b: Vale.X64.Memory.buffer128 -> va_in_count: Prims.nat -> Prims.Ghost ((Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel) * Prims.nat)
{ "end_col": 23, "end_line": 1602, "start_col": 93, "start_line": 1553 }
Prims.Tot
val va_code_Sha_update_bytes_stdcall : win:bool -> Tot va_code
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_code_Sha_update_bytes_stdcall win = (va_Block (va_CCons (va_code_CreateHeaplets ()) (va_CCons (if win then va_Block (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 15) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 14) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 13) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 12) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 11) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 10) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 9) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 8) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR15)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR14)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR13)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR12)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRsi)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRdi)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRbp)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRbx)) (va_CNil ()))))))))))))))))))) else va_Block (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR15)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR14)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR13)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR12)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRsi)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRdi)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRbp)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRbx)) (va_CNil ())))))))))) (va_CCons (if win then va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRdi) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRsi) (va_op_opr64_reg64 rRdx)) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRdx) (va_op_opr64_reg64 rR8)) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))) else va_Block (va_CNil ())) (va_CCons (va_code_Sha_update_bytes ()) (va_CCons (if win then va_Block (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRbx)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRbp)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRdi)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRsi)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR12)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR13)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR14)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR15)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 8) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 9) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 10) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 11) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 12) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 13) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 14) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 15) (va_op_reg_opr64_reg64 rRax)) (va_CNil ()))))))))))))))))))) else va_Block (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRbx)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRbp)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRdi)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRsi)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR12)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR13)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR14)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR15)) (va_CNil ())))))))))) (va_CCons (va_code_DestroyHeaplets ()) (va_CNil ()))))))))
val va_code_Sha_update_bytes_stdcall : win:bool -> Tot va_code let va_code_Sha_update_bytes_stdcall win =
false
null
false
(va_Block (va_CCons (va_code_CreateHeaplets ()) (va_CCons (if win then va_Block (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 15) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 14) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 13) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 12) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 11) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 10) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 9) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 8) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 7 ) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR15)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR14)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR13)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR12)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRsi)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRdi)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRbp)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRbx )) (va_CNil () )))))))) ))))))))))) else va_Block (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR15)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR14)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR13)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR12)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRsi)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRdi)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRbp )) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRbx )) (va_CNil ())))))))))) (va_CCons (if win then va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRdi) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRsi) (va_op_opr64_reg64 rRdx)) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRdx) (va_op_opr64_reg64 rR8)) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))) else va_Block (va_CNil ())) (va_CCons (va_code_Sha_update_bytes ()) (va_CCons (if win then va_Block (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRbx)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRbp)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRdi)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRsi) ) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR12 )) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR13)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR14)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR15)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax )) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 8) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 9) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 10) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 11) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 12 ) (va_op_reg_opr64_reg64 rRax )) (va_CCons ( va_code_PopXmm_Secret (va_op_xmm_xmm 13 ) (va_op_reg_opr64_reg64 rRax )) (va_CCons (va_code_PopXmm_Secret ( va_op_xmm_xmm 14 ) ( va_op_reg_opr64_reg64 rRax ) ) (va_CCons ( va_code_PopXmm_Secret ( va_op_xmm_xmm 15 ) ( va_op_reg_opr64_reg64 rRax ) ) ( va_CNil () ) )) )))))))))) )))))) else va_Block (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRbx)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRbp)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRdi)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRsi) ) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR12 )) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR13)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR14)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR15)) (va_CNil ())))))))))) (va_CCons (va_code_DestroyHeaplets ()) (va_CNil ()))))))))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Prims.bool", "Vale.X64.Decls.va_Block", "Vale.X64.Decls.va_CCons", "Vale.X64.InsMem.va_code_CreateHeaplets", "Vale.X64.InsStack.va_code_PushXmm_Secret", "Vale.X64.Decls.va_op_xmm_xmm", "Vale.X64.Decls.va_op_reg_opr64_reg64", "Vale.X64.Machine_s.rRax", "Vale.X64.InsStack.va_code_Push_Secret", "Vale.X64.Machine_s.rR15", "Vale.X64.Machine_s.rR14", "Vale.X64.Machine_s.rR13", "Vale.X64.Machine_s.rR12", "Vale.X64.Machine_s.rRsi", "Vale.X64.Machine_s.rRdi", "Vale.X64.Machine_s.rRbp", "Vale.X64.Machine_s.rRbx", "Vale.X64.Decls.va_CNil", "Vale.X64.Decls.va_code", "Vale.X64.InsBasic.va_code_Mov64", "Vale.X64.Decls.va_op_dst_opr64_reg64", "Vale.X64.Decls.va_op_opr64_reg64", "Vale.X64.Machine_s.rRcx", "Vale.X64.Machine_s.rRdx", "Vale.X64.Machine_s.rR8", "Vale.X64.Machine_s.rR9", "Vale.SHA.X64.va_code_Sha_update_bytes", "Vale.X64.InsStack.va_code_Pop_Secret", "Vale.X64.InsStack.va_code_PopXmm_Secret", "Vale.X64.InsMem.va_code_DestroyHeaplets" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ()))) val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_body0 () = (va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_body0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 578 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds in_b k_b (count `op_Multiply` 4) hash_orig) (fun (va_s:va_state) _ -> let (count:nat) = count + 1 in va_QEmpty ((count))))) val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_body0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_body0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_body0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 576 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0 /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_body0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_body0 (va_code_Loop_body0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_body0 ())) = (va_QProc (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop_while0 val va_code_Loop_while0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_while0 () = (va_Block (va_CCons (va_While (va_cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (va_Block (va_CCons (va_code_Loop_body0 ()) (va_CNil ())))) (va_CNil ()))) val va_codegen_success_Loop_while0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_while0 () = (va_pbool_and (va_codegen_success_Loop_body0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_while0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_while0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qWhile va_mods (Cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (fun va_g -> let (count:nat) = let count = va_g in count in qblock va_mods (fun (va_s:va_state) -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_body0 va_old hash_orig in_b k_b count) (fun (va_s:va_state) (count:nat) -> va_QEmpty ((count))))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_ok va_s /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRsi va_old) in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRcx va_s) k_b 16 (va_get_mem_layout va_s) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_s == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_reg64 rRdx va_s) ((count))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in let va_g = (count) in let (count:nat) = va_g in va_QEmpty ((count))))) val va_lemma_Loop_while0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_while0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig))) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_while0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_while0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_while0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~(va_get_reg64 rRdx va_sM > 0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_while0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_while0 (va_code_Loop_while0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_while0 ())) = (va_QProc (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop val va_code_Loop : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop () = (va_Block (va_CCons (va_code_Loop_while0 ()) (va_CNil ()))) val va_codegen_success_Loop : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop () = (va_pbool_and (va_codegen_success_Loop_while0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (count:nat) = 0 in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 556 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_while0 va_old_s hash_orig in_b k_b count) (fun (va_s:va_state) count -> va_QEmpty (())))) val va_lemma_Loop : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop va_b0 va_s0 in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop va_mods in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 547 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 548 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == 0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 551 column 90 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) ==> va_k va_sM (()))) val va_wpProof_Loop : in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop (va_code_Loop ()) va_s0 in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (va_QProc (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop in_b k_b) (va_wpProof_Loop in_b k_b)) //-- //-- Epilogue val va_code_Epilogue : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Epilogue () = (va_Block (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_CNil ()))))))))) val va_codegen_success_Epilogue : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Epilogue () = (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_ttrue ())))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Epilogue (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Epilogue ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 612 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 613 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 614 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 616 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 617 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 619 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret ctx_b 0) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 620 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret ctx_b 1) (fun (va_s:va_state) _ -> let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 623 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_old_s) (va_get_xmm 2 va_old_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))) val va_lemma_Epilogue : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Epilogue ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Epilogue va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Epilogue va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Epilogue ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 583 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 603 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 606 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Epilogue (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_mem:vale_heap) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_heap0:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_mem va_x_mem va_s0))))) in va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) ==> va_k va_sM (()))) val va_wpProof_Epilogue : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Epilogue ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Epilogue ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Epilogue ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Epilogue (va_code_Epilogue ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Epilogue (ctx_b:buffer128) : (va_quickCode unit (va_code_Epilogue ())) = (va_QProc (va_code_Epilogue ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) (va_wp_Epilogue ctx_b) (va_wpProof_Epilogue ctx_b)) //-- //-- Sha_update val va_code_Sha_update : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Sha_update () = (va_Block (va_CCons (va_code_Preamble ()) (va_CCons (va_code_Loop ()) (va_CCons (va_code_Epilogue ()) (va_CNil ()))))) val va_codegen_success_Sha_update : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Sha_update () = (va_pbool_and (va_codegen_success_Preamble ()) (va_pbool_and (va_codegen_success_Loop ()) (va_pbool_and (va_codegen_success_Epilogue ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Sha_update (va_mods:va_mods_t) (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 667 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Preamble ctx_b) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 668 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop in_b k_b) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 669 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Epilogue ctx_b) (va_QEmpty (())))))) val va_lemma_Sha_update : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Sha_update ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))))))))))))))) [@"opaque_to_smt"] let va_lemma_Sha_update va_b0 va_s0 ctx_b in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Sha_update va_mods ctx_b in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Sha_update ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 627 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 653 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 662 column 103 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 665 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Sha_update (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_mem:vale_heap) (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_heap0:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi (va_upd_mem va_x_mem va_s0)))))))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) ==> va_k va_sM (()))) val va_wpProof_Sha_update : ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Sha_update ctx_b in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Sha_update ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Sha_update ctx_b in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Sha_update (va_code_Sha_update ()) va_s0 ctx_b in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Sha_update (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update ())) = (va_QProc (va_code_Sha_update ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) (va_wp_Sha_update ctx_b in_b k_b) (va_wpProof_Sha_update ctx_b in_b k_b)) //-- //-- Sha_update_bytes #push-options "--z3rlimit 80" #restart-solver val va_code_Sha_update_bytes : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Sha_update_bytes () = (va_Block (va_CCons (va_code_Sha_update ()) (va_CCons (va_Block (va_CNil ())) (va_CNil ())))) val va_codegen_success_Sha_update_bytes : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Sha_update_bytes () = (va_pbool_and (va_codegen_success_Sha_update ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Sha_update_bytes (va_mods:va_mods_t) (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update_bytes ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 714 column 15 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sha_update ctx_b in_b k_b) (fun (va_s:va_state) _ -> let (old_ctx:(seq (four nat32))) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_old_s) ctx_b in let (new_ctx:(seq (four nat32))) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) ctx_b in let (va_arg34:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = old_ctx in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 717 column 24 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_hash_to_bytes va_arg34) (let (va_arg33:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = new_ctx in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 718 column 24 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_hash_to_bytes va_arg33) (let (hash_in:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes old_ctx) in let (hash_out:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes new_ctx) in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 728 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_old_s)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_old_s) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 730 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (hash_out == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_in) (let (va_arg32:(FStar.Seq.Base.seq Vale.SHA.SHA_helpers.byte)) = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes input_LE) in let (va_arg31:(FStar.Seq.Base.seq Vale.Def.Words_s.nat8)) = Vale.Def.Types_s.le_seq_quad32_to_bytes input_LE in let (va_arg30:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = input_LE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 731 column 34 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_equiv_vale hash_in hash_out va_arg30 input_BE va_arg31 va_arg32) (va_QEmpty (()))))))))) val va_lemma_Sha_update_bytes : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Sha_update_bytes ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 ctx_b == 2 /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 in_b == 4 `op_Multiply` va_get_reg64 rRdx va_s0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let hash_in = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) ctx_b)) in let hash_out = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) ctx_b)) in (let input_LE = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b)) in l_and (FStar.Seq.Base.length #FStar.UInt8.t input_LE `op_Modulus` 64 == 0) (hash_out == Vale.SHA.SHA_helpers.update_multi_opaque_vale hash_in input_LE)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))))))))))))))) [@"opaque_to_smt"] let va_lemma_Sha_update_bytes va_b0 va_s0 ctx_b in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Sha_update_bytes va_mods ctx_b in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Sha_update_bytes ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 672 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 702 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 704 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_in = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) ctx_b)) in label va_range1 "***** POSTCONDITION NOT MET AT line 705 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_out = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) ctx_b)) in label va_range1 "***** POSTCONDITION NOT MET AT line 709 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b)) in l_and (FStar.Seq.Base.length #FStar.UInt8.t input_LE `op_Modulus` 64 == 0) (hash_out == Vale.SHA.SHA_helpers.update_multi_opaque_vale hash_in input_LE)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 712 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Sha_update_bytes (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 ctx_b == 2 /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 in_b == 4 `op_Multiply` va_get_reg64 rRdx va_s0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_mem:vale_heap) (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_heap0:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi (va_upd_mem va_x_mem va_s0)))))))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let hash_in = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) ctx_b)) in let hash_out = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) ctx_b)) in (let input_LE = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b)) in l_and (FStar.Seq.Base.length #FStar.UInt8.t input_LE `op_Modulus` 64 == 0) (hash_out == Vale.SHA.SHA_helpers.update_multi_opaque_vale hash_in input_LE)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM))) ==> va_k va_sM (()))) val va_wpProof_Sha_update_bytes : ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Sha_update_bytes ctx_b in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Sha_update_bytes ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Sha_update_bytes ctx_b in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Sha_update_bytes (va_code_Sha_update_bytes ()) va_s0 ctx_b in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Sha_update_bytes (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update_bytes ())) = (va_QProc (va_code_Sha_update_bytes ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) (va_wp_Sha_update_bytes ctx_b in_b k_b) (va_wpProof_Sha_update_bytes ctx_b in_b k_b)) #pop-options //-- //-- Sha_update_bytes_stdcall #push-options "--z3rlimit 80" #restart-solver [@ "opaque_to_smt" va_qattr]
false
true
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 80, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_code_Sha_update_bytes_stdcall : win:bool -> Tot va_code
[]
Vale.SHA.X64.va_code_Sha_update_bytes_stdcall
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
win: Prims.bool -> Vale.X64.Decls.va_code
{ "end_col": 23, "end_line": 2575, "start_col": 2, "start_line": 2525 }
Prims.Ghost
val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM)
val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig =
false
null
false
let va_mods:va_mods_t = [ va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok ] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let va_sM, va_fM, va_g = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([ va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok ]) va_sM va_s0; (va_sM, va_fM)
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[]
[ "Vale.X64.Decls.va_code", "Vale.X64.Decls.va_state", "Prims.nat", "Vale.X64.Memory.buffer128", "Vale.SHA.SHA_helpers.block_w", "Vale.SHA.SHA_helpers.hash256", "Vale.X64.QuickCodes.fuel", "Prims.unit", "FStar.Pervasives.Native.Mktuple2", "Vale.X64.Decls.va_fuel", "Vale.X64.QuickCode.va_lemma_norm_mods", "Prims.Cons", "Vale.X64.QuickCode.mod_t", "Vale.X64.QuickCode.va_Mod_flags", "Vale.X64.QuickCode.va_Mod_xmm", "Vale.X64.QuickCode.va_Mod_ok", "Prims.Nil", "FStar.Pervasives.assert_norm", "Prims.eq2", "Prims.list", "Vale.X64.QuickCode.__proj__QProc__item__mods", "Vale.SHA.X64.va_code_Loop_rounds_16_51_body", "FStar.Pervasives.Native.tuple2", "FStar.Pervasives.Native.tuple3", "Vale.X64.State.vale_state", "Vale.X64.QuickCodes.va_wp_sound_code_norm", "Prims.l_and", "Vale.X64.QuickCodes.label", "Vale.X64.QuickCodes.va_range1", "Prims.b2t", "Vale.X64.Decls.va_get_ok", "Vale.SHA.SHA_helpers.make_hash", "Vale.X64.Decls.va_get_xmm", "Vale.SHA.SHA_helpers.repeat_range_vale", "Prims.op_Multiply", "Prims.op_Addition", "Vale.Def.Types_s.quad32", "Vale.SHA.SHA_helpers.ws_quad32", "Vale.Arch.Types.add_wrap_quad32", "Vale.SHA.SHA_helpers.ws_partial", "Vale.X64.QuickCode.quickCode", "Vale.SHA.X64.va_qcode_Loop_rounds_16_51_body" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))))
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))))
[]
Vale.SHA.X64.va_lemma_Loop_rounds_16_51_body
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_b0: Vale.X64.Decls.va_code -> va_s0: Vale.X64.Decls.va_state -> i: Prims.nat -> k_b: Vale.X64.Memory.buffer128 -> block: Vale.SHA.SHA_helpers.block_w -> hash_orig: Vale.SHA.SHA_helpers.hash256 -> Prims.Ghost (Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel)
{ "end_col": 16, "end_line": 713, "start_col": 71, "start_line": 686 }
Prims.Ghost
val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM)
val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block =
false
null
false
let va_mods:va_mods_t = [ va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok ] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let va_sM, va_fM, va_g = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([ va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok ]) va_sM va_s0; (va_sM, va_fM)
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[]
[ "Vale.X64.Decls.va_code", "Vale.X64.Decls.va_state", "Vale.X64.Memory.buffer128", "Vale.SHA.SHA_helpers.block_w", "Vale.X64.QuickCodes.fuel", "Prims.unit", "FStar.Pervasives.Native.Mktuple2", "Vale.X64.Decls.va_fuel", "Vale.X64.QuickCode.va_lemma_norm_mods", "Prims.Cons", "Vale.X64.QuickCode.mod_t", "Vale.X64.QuickCode.va_Mod_flags", "Vale.X64.QuickCode.va_Mod_xmm", "Vale.X64.QuickCode.va_Mod_reg64", "Vale.X64.Machine_s.rRdx", "Vale.X64.QuickCode.va_Mod_ok", "Prims.Nil", "FStar.Pervasives.assert_norm", "Prims.eq2", "Prims.list", "Vale.X64.QuickCode.__proj__QProc__item__mods", "Vale.SHA.X64.va_code_Loop_rounds_52_64", "FStar.Pervasives.Native.tuple2", "FStar.Pervasives.Native.tuple3", "Vale.X64.State.vale_state", "Vale.X64.QuickCodes.va_wp_sound_code_norm", "Prims.l_and", "Vale.X64.QuickCodes.label", "Vale.X64.QuickCodes.va_range1", "Prims.b2t", "Vale.X64.Decls.va_get_ok", "Vale.X64.Decls.quad32", "Vale.X64.Decls.va_get_xmm", "Prims.int", "Vale.X64.Decls.va_get_reg64", "Prims.op_Subtraction", "Vale.SHA.SHA_helpers.hash256", "Vale.SHA.SHA_helpers.make_hash", "Vale.SHA.SHA_helpers.update_block", "Vale.X64.QuickCode.quickCode", "Vale.SHA.X64.va_qcode_Loop_rounds_52_64" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))))
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))))
[]
Vale.SHA.X64.va_lemma_Loop_rounds_52_64
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_b0: Vale.X64.Decls.va_code -> va_s0: Vale.X64.Decls.va_state -> k_b: Vale.X64.Memory.buffer128 -> block: Vale.SHA.SHA_helpers.block_w -> Prims.Ghost (Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel)
{ "end_col": 16, "end_line": 1259, "start_col": 54, "start_line": 1239 }
Prims.Tot
val va_qcode_Loop_body0 (va_mods: va_mods_t) (va_old: va_state) (va_in_hash_orig: hash256) (va_in_in_b va_in_k_b: buffer128) (va_in_count: nat) : (va_quickCode (nat) (va_code_Loop_body0 ()))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_qcode_Loop_body0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 578 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds in_b k_b (count `op_Multiply` 4) hash_orig) (fun (va_s:va_state) _ -> let (count:nat) = count + 1 in va_QEmpty ((count)))))
val va_qcode_Loop_body0 (va_mods: va_mods_t) (va_old: va_state) (va_in_hash_orig: hash256) (va_in_in_b va_in_k_b: buffer128) (va_in_count: nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) let va_qcode_Loop_body0 (va_mods: va_mods_t) (va_old: va_state) (va_in_hash_orig: hash256) (va_in_in_b va_in_k_b: buffer128) (va_in_count: nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) =
false
null
false
(qblock va_mods (fun (va_s: va_state) -> let va_old_s:va_state = va_s in let hash_orig:hash256 = va_in_hash_orig in let in_b:buffer128 = va_in_in_b in let k_b:buffer128 = va_in_k_b in let count:nat = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 578 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds in_b k_b (count `op_Multiply` 4) hash_orig) (fun (va_s: va_state) _ -> let count:nat = count + 1 in va_QEmpty ((count)))))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Vale.X64.QuickCode.va_mods_t", "Vale.X64.Decls.va_state", "Vale.SHA.SHA_helpers.hash256", "Vale.X64.Memory.buffer128", "Prims.nat", "Vale.X64.QuickCodes.qblock", "Prims.Cons", "Vale.X64.Decls.va_code", "Vale.SHA.X64.va_code_Loop_rounds", "Prims.Nil", "Vale.X64.Machine_s.precode", "Vale.X64.Decls.ins", "Vale.X64.Decls.ocmp", "Vale.X64.QuickCodes.va_QBind", "Prims.unit", "Vale.X64.QuickCodes.va_range1", "Vale.SHA.X64.va_quick_Loop_rounds", "Prims.op_Multiply", "Vale.X64.QuickCodes.va_QEmpty", "Prims.op_Addition", "Vale.X64.QuickCodes.quickCodes", "Vale.X64.State.vale_state", "Vale.X64.QuickCode.va_quickCode", "Vale.SHA.X64.va_code_Loop_body0" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ()))) val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_body0 () = (va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_body0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat)
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_qcode_Loop_body0 (va_mods: va_mods_t) (va_old: va_state) (va_in_hash_orig: hash256) (va_in_in_b va_in_k_b: buffer128) (va_in_count: nat) : (va_quickCode (nat) (va_code_Loop_body0 ()))
[]
Vale.SHA.X64.va_qcode_Loop_body0
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_mods: Vale.X64.QuickCode.va_mods_t -> va_old: Vale.X64.Decls.va_state -> va_in_hash_orig: Vale.SHA.SHA_helpers.hash256 -> va_in_in_b: Vale.X64.Memory.buffer128 -> va_in_k_b: Vale.X64.Memory.buffer128 -> va_in_count: Prims.nat -> Vale.X64.QuickCode.va_quickCode Prims.nat (Vale.SHA.X64.va_code_Loop_body0 ())
{ "end_col": 53, "end_line": 1508, "start_col": 2, "start_line": 1503 }
Prims.Ghost
val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM)
val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig =
false
null
false
let va_mods:va_mods_t = [ va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok ] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let va_sM, va_fM, va_g = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([ va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok ]) va_sM va_s0; (va_sM, va_fM)
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[]
[ "Vale.X64.Decls.va_code", "Vale.X64.Decls.va_state", "Vale.X64.Memory.buffer128", "Prims.nat", "Vale.SHA.SHA_helpers.hash256", "Vale.X64.QuickCodes.fuel", "Prims.unit", "FStar.Pervasives.Native.Mktuple2", "Vale.X64.Decls.va_fuel", "Vale.X64.QuickCode.va_lemma_norm_mods", "Prims.Cons", "Vale.X64.QuickCode.mod_t", "Vale.X64.QuickCode.va_Mod_flags", "Vale.X64.QuickCode.va_Mod_xmm", "Vale.X64.QuickCode.va_Mod_reg64", "Vale.X64.Machine_s.rRdx", "Vale.X64.Machine_s.rRsi", "Vale.X64.QuickCode.va_Mod_ok", "Prims.Nil", "FStar.Pervasives.assert_norm", "Prims.eq2", "Prims.list", "Vale.X64.QuickCode.__proj__QProc__item__mods", "Vale.SHA.X64.va_code_Loop_rounds", "FStar.Pervasives.Native.tuple2", "FStar.Pervasives.Native.tuple3", "Vale.X64.State.vale_state", "Vale.X64.QuickCodes.va_wp_sound_code_norm", "Prims.l_and", "Vale.X64.QuickCodes.label", "Vale.X64.QuickCodes.va_range1", "Prims.b2t", "Vale.X64.Decls.va_get_ok", "Prims.int", "Vale.X64.Decls.va_get_reg64", "Prims.op_Addition", "Prims.op_Subtraction", "Vale.Def.Words_s.four", "Vale.Def.Types_s.nat32", "Vale.X64.Decls.va_get_xmm", "Vale.Def.Words_s.Mkfour", "Vale.SHA.SHA_helpers.make_hash", "Vale.SHA.SHA_helpers.update_multi_quads", "FStar.Seq.Base.seq", "Vale.Def.Types_s.quad32", "Vale.Arch.Types.reverse_bytes_nat32_quad32_seq", "FStar.Seq.Base.slice", "Vale.X64.Decls.quad32", "Vale.X64.Decls.buffer128_as_seq", "Vale.X64.Decls.va_get_mem_heaplet", "Vale.X64.QuickCode.quickCode", "Vale.SHA.X64.va_qcode_Loop_rounds" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))))
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))))
[]
Vale.SHA.X64.va_lemma_Loop_rounds
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_b0: Vale.X64.Decls.va_code -> va_s0: Vale.X64.Decls.va_state -> in_b: Vale.X64.Memory.buffer128 -> k_b: Vale.X64.Memory.buffer128 -> offset: Prims.nat -> hash_orig: Vale.SHA.SHA_helpers.hash256 -> Prims.Ghost (Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel)
{ "end_col": 16, "end_line": 1420, "start_col": 64, "start_line": 1391 }
Prims.Tot
val va_quick_Loop_body0 (va_old: va_state) (va_in_hash_orig: hash256) (va_in_in_b va_in_k_b: buffer128) (va_in_count: nat) : (va_quickCode nat (va_code_Loop_body0 ()))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_quick_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_body0 ())) = (va_QProc (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count))
val va_quick_Loop_body0 (va_old: va_state) (va_in_hash_orig: hash256) (va_in_in_b va_in_k_b: buffer128) (va_in_count: nat) : (va_quickCode nat (va_code_Loop_body0 ())) let va_quick_Loop_body0 (va_old: va_state) (va_in_hash_orig: hash256) (va_in_in_b va_in_k_b: buffer128) (va_in_count: nat) : (va_quickCode nat (va_code_Loop_body0 ())) =
false
null
false
(va_QProc (va_code_Loop_body0 ()) ([ va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags ]) (va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Vale.X64.Decls.va_state", "Vale.SHA.SHA_helpers.hash256", "Vale.X64.Memory.buffer128", "Prims.nat", "Vale.X64.QuickCode.va_QProc", "Vale.SHA.X64.va_code_Loop_body0", "Prims.Cons", "Vale.X64.QuickCode.mod_t", "Vale.X64.QuickCode.va_Mod_xmm", "Vale.X64.QuickCode.va_Mod_reg64", "Vale.X64.Machine_s.rRsi", "Vale.X64.Machine_s.rRdx", "Vale.X64.QuickCode.va_Mod_ok", "Vale.X64.QuickCode.va_Mod_flags", "Prims.Nil", "Vale.SHA.X64.va_wp_Loop_body0", "Vale.SHA.X64.va_wpProof_Loop_body0", "Vale.X64.QuickCode.va_quickCode" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ()))) val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_body0 () = (va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_body0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 578 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds in_b k_b (count `op_Multiply` 4) hash_orig) (fun (va_s:va_state) _ -> let (count:nat) = count + 1 in va_QEmpty ((count))))) val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_body0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_body0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_body0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 576 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0 /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_body0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_body0 (va_code_Loop_body0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128)
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_quick_Loop_body0 (va_old: va_state) (va_in_hash_orig: hash256) (va_in_in_b va_in_k_b: buffer128) (va_in_count: nat) : (va_quickCode nat (va_code_Loop_body0 ()))
[]
Vale.SHA.X64.va_quick_Loop_body0
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_old: Vale.X64.Decls.va_state -> va_in_hash_orig: Vale.SHA.SHA_helpers.hash256 -> va_in_in_b: Vale.X64.Memory.buffer128 -> va_in_k_b: Vale.X64.Memory.buffer128 -> va_in_count: Prims.nat -> Vale.X64.QuickCode.va_quickCode Prims.nat (Vale.SHA.X64.va_code_Loop_body0 ())
{ "end_col": 38, "end_line": 1681, "start_col": 2, "start_line": 1677 }
Prims.Ghost
val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM)
val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset =
false
null
false
let va_mods:va_mods_t = [ va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok ] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let va_sM, va_fM, va_g = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let block:block_w = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([ va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok ]) va_sM va_s0; (va_sM, va_fM)
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[]
[ "Vale.X64.Decls.va_code", "Vale.X64.Decls.va_state", "Vale.X64.Memory.buffer128", "Prims.nat", "Vale.X64.QuickCodes.fuel", "Prims.unit", "FStar.Pervasives.Native.Mktuple2", "Vale.X64.Decls.va_fuel", "Vale.X64.QuickCode.va_lemma_norm_mods", "Prims.Cons", "Vale.X64.QuickCode.mod_t", "Vale.X64.QuickCode.va_Mod_flags", "Vale.X64.QuickCode.va_Mod_xmm", "Vale.X64.QuickCode.va_Mod_reg64", "Vale.X64.Machine_s.rRsi", "Vale.X64.QuickCode.va_Mod_ok", "Prims.Nil", "FStar.Pervasives.assert_norm", "Prims.eq2", "Prims.list", "Vale.X64.QuickCode.__proj__QProc__item__mods", "Vale.SHA.X64.va_code_Loop_rounds_0_15", "FStar.Pervasives.Native.tuple2", "FStar.Pervasives.Native.tuple3", "Vale.X64.State.vale_state", "Vale.X64.QuickCodes.va_wp_sound_code_norm", "Prims.l_and", "Vale.X64.QuickCodes.label", "Vale.X64.QuickCodes.va_range1", "Prims.b2t", "Vale.X64.Decls.va_get_ok", "Prims.int", "Vale.X64.Decls.va_get_reg64", "Prims.op_Addition", "Vale.SHA.SHA_helpers.hash256", "Vale.SHA.SHA_helpers.make_hash", "Vale.X64.Decls.va_get_xmm", "Vale.SHA.SHA_helpers.repeat_range_vale", "Vale.Def.Types_s.quad32", "Vale.SHA.SHA_helpers.ws_quad32", "Vale.Arch.Types.add_wrap_quad32", "Vale.SHA.SHA_helpers.ws_partial", "Vale.SHA.SHA_helpers.block_w", "Vale.SHA.SHA_helpers.quads_to_block", "FStar.Seq.Base.seq", "Vale.Arch.Types.reverse_bytes_nat32_quad32_seq", "FStar.Seq.Base.slice", "Vale.X64.Decls.quad32", "Vale.X64.Decls.buffer128_as_seq", "Vale.X64.Decls.va_get_mem_heaplet", "Vale.X64.QuickCode.quickCode", "Vale.SHA.X64.va_qcode_Loop_rounds_0_15" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))
[]
Vale.SHA.X64.va_lemma_Loop_rounds_0_15
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_b0: Vale.X64.Decls.va_code -> va_s0: Vale.X64.Decls.va_state -> in_b: Vale.X64.Memory.buffer128 -> k_b: Vale.X64.Memory.buffer128 -> offset: Prims.nat -> Prims.Ghost (Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel)
{ "end_col": 16, "end_line": 527, "start_col": 59, "start_line": 496 }
Prims.Ghost
val va_wpProof_Loop_body0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g))))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_body0 (va_code_Loop_body0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g)
val va_wpProof_Loop_body0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) let va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k =
false
null
false
let va_sM, va_f0, count = va_lemma_Loop_body0 (va_code_Loop_body0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))) ); va_lemma_norm_mods ([ va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags ]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g)
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[]
[ "Vale.X64.Decls.va_state", "Vale.SHA.SHA_helpers.hash256", "Vale.X64.Memory.buffer128", "Prims.nat", "Vale.X64.Decls.va_fuel", "FStar.Pervasives.Native.Mktuple3", "Prims.unit", "Vale.X64.QuickCode.va_lemma_norm_mods", "Prims.Cons", "Vale.X64.QuickCode.mod_t", "Vale.X64.QuickCode.va_Mod_xmm", "Vale.X64.QuickCode.va_Mod_reg64", "Vale.X64.Machine_s.rRsi", "Vale.X64.Machine_s.rRdx", "Vale.X64.QuickCode.va_Mod_ok", "Vale.X64.QuickCode.va_Mod_flags", "Prims.Nil", "Prims._assert", "Vale.X64.Decls.va_state_eq", "Vale.X64.Decls.va_update_xmm", "Vale.X64.Decls.va_update_reg64", "Vale.X64.Decls.va_update_ok", "Vale.X64.Decls.va_update_flags", "Vale.X64.Decls.va_lemma_upd_update", "FStar.Pervasives.Native.tuple3", "Vale.X64.State.vale_state", "Vale.SHA.X64.va_lemma_Loop_body0", "Vale.SHA.X64.va_code_Loop_body0" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ()))) val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_body0 () = (va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_body0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 578 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds in_b k_b (count `op_Multiply` 4) hash_orig) (fun (va_s:va_state) _ -> let (count:nat) = count + 1 in va_QEmpty ((count))))) val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_body0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_body0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_body0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 576 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0 /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_body0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g))))
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_wpProof_Loop_body0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g))))
[]
Vale.SHA.X64.va_wpProof_Loop_body0
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_old: Vale.X64.Decls.va_state -> va_in_hash_orig: Vale.SHA.SHA_helpers.hash256 -> va_in_in_b: Vale.X64.Memory.buffer128 -> va_in_k_b: Vale.X64.Memory.buffer128 -> va_in_count: Prims.nat -> va_s0: Vale.X64.Decls.va_state -> va_k: (_: Vale.X64.Decls.va_state -> _: Prims.nat -> Type0) -> Prims.Ghost ((Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel) * Prims.nat)
{ "end_col": 22, "end_line": 1672, "start_col": 94, "start_line": 1659 }
Prims.Tot
val va_quick_Loop_while0 (va_old: va_state) (va_in_hash_orig: hash256) (va_in_in_b va_in_k_b: buffer128) (va_in_count: nat) : (va_quickCode nat (va_code_Loop_while0 ()))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_quick_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_while0 ())) = (va_QProc (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count))
val va_quick_Loop_while0 (va_old: va_state) (va_in_hash_orig: hash256) (va_in_in_b va_in_k_b: buffer128) (va_in_count: nat) : (va_quickCode nat (va_code_Loop_while0 ())) let va_quick_Loop_while0 (va_old: va_state) (va_in_hash_orig: hash256) (va_in_in_b va_in_k_b: buffer128) (va_in_count: nat) : (va_quickCode nat (va_code_Loop_while0 ())) =
false
null
false
(va_QProc (va_code_Loop_while0 ()) ([ va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags ]) (va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Vale.X64.Decls.va_state", "Vale.SHA.SHA_helpers.hash256", "Vale.X64.Memory.buffer128", "Prims.nat", "Vale.X64.QuickCode.va_QProc", "Vale.SHA.X64.va_code_Loop_while0", "Prims.Cons", "Vale.X64.QuickCode.mod_t", "Vale.X64.QuickCode.va_Mod_xmm", "Vale.X64.QuickCode.va_Mod_reg64", "Vale.X64.Machine_s.rRsi", "Vale.X64.Machine_s.rRdx", "Vale.X64.QuickCode.va_Mod_ok", "Vale.X64.QuickCode.va_Mod_flags", "Prims.Nil", "Vale.SHA.X64.va_wp_Loop_while0", "Vale.SHA.X64.va_wpProof_Loop_while0", "Vale.X64.QuickCode.va_quickCode" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ()))) val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_body0 () = (va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_body0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 578 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds in_b k_b (count `op_Multiply` 4) hash_orig) (fun (va_s:va_state) _ -> let (count:nat) = count + 1 in va_QEmpty ((count))))) val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_body0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_body0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_body0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 576 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0 /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_body0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_body0 (va_code_Loop_body0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_body0 ())) = (va_QProc (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop_while0 val va_code_Loop_while0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_while0 () = (va_Block (va_CCons (va_While (va_cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (va_Block (va_CCons (va_code_Loop_body0 ()) (va_CNil ())))) (va_CNil ()))) val va_codegen_success_Loop_while0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_while0 () = (va_pbool_and (va_codegen_success_Loop_body0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_while0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_while0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qWhile va_mods (Cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (fun va_g -> let (count:nat) = let count = va_g in count in qblock va_mods (fun (va_s:va_state) -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_body0 va_old hash_orig in_b k_b count) (fun (va_s:va_state) (count:nat) -> va_QEmpty ((count))))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_ok va_s /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRsi va_old) in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRcx va_s) k_b 16 (va_get_mem_layout va_s) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_s == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_reg64 rRdx va_s) ((count))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in let va_g = (count) in let (count:nat) = va_g in va_QEmpty ((count))))) val va_lemma_Loop_while0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_while0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig))) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_while0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_while0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_while0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~(va_get_reg64 rRdx va_sM > 0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_while0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_while0 (va_code_Loop_while0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128)
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_quick_Loop_while0 (va_old: va_state) (va_in_hash_orig: hash256) (va_in_in_b va_in_k_b: buffer128) (va_in_count: nat) : (va_quickCode nat (va_code_Loop_while0 ()))
[]
Vale.SHA.X64.va_quick_Loop_while0
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_old: Vale.X64.Decls.va_state -> va_in_hash_orig: Vale.SHA.SHA_helpers.hash256 -> va_in_in_b: Vale.X64.Memory.buffer128 -> va_in_k_b: Vale.X64.Memory.buffer128 -> va_in_count: Prims.nat -> Vale.X64.QuickCode.va_quickCode Prims.nat (Vale.SHA.X64.va_code_Loop_while0 ())
{ "end_col": 54, "end_line": 1897, "start_col": 2, "start_line": 1893 }
Prims.Tot
val va_qcode_Loop_while0 (va_mods: va_mods_t) (va_old: va_state) (va_in_hash_orig: hash256) (va_in_in_b va_in_k_b: buffer128) (va_in_count: nat) : (va_quickCode (nat) (va_code_Loop_while0 ()))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_qcode_Loop_while0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_while0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qWhile va_mods (Cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (fun va_g -> let (count:nat) = let count = va_g in count in qblock va_mods (fun (va_s:va_state) -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_body0 va_old hash_orig in_b k_b count) (fun (va_s:va_state) (count:nat) -> va_QEmpty ((count))))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_ok va_s /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRsi va_old) in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRcx va_s) k_b 16 (va_get_mem_layout va_s) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_s == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_reg64 rRdx va_s) ((count))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in let va_g = (count) in let (count:nat) = va_g in va_QEmpty ((count)))))
val va_qcode_Loop_while0 (va_mods: va_mods_t) (va_old: va_state) (va_in_hash_orig: hash256) (va_in_in_b va_in_k_b: buffer128) (va_in_count: nat) : (va_quickCode (nat) (va_code_Loop_while0 ())) let va_qcode_Loop_while0 (va_mods: va_mods_t) (va_old: va_state) (va_in_hash_orig: hash256) (va_in_in_b va_in_k_b: buffer128) (va_in_count: nat) : (va_quickCode (nat) (va_code_Loop_while0 ())) =
false
null
false
(qblock va_mods (fun (va_s: va_state) -> let va_old_s:va_state = va_s in let hash_orig:hash256 = va_in_hash_orig in let in_b:buffer128 = va_in_in_b in let k_b:buffer128 = va_in_k_b in let count:nat = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qWhile va_mods (Cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (fun va_g -> let count:nat = let count = va_g in count in qblock va_mods (fun (va_s: va_state) -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_body0 va_old hash_orig in_b k_b count) (fun (va_s: va_state) (count: nat) -> va_QEmpty ((count))))) (fun (va_s: va_state) va_g -> let count:nat = let count = va_g in count in va_get_ok va_s /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRsi va_old) in_b (4 `op_Multiply` (va_get_reg64 rRdx va_old)) (va_get_mem_layout va_s) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRcx va_s) k_b 16 (va_get_mem_layout va_s) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` (va_get_reg64 rRdx va_old) < pow2_64 /\ va_get_reg64 rRdx va_s == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_s == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) (fun (va_s: va_state) va_g -> let count:nat = let count = va_g in count in va_get_reg64 rRdx va_s) ((count))) (fun (va_s: va_state) va_g -> let count:nat = let count = va_g in count in let va_g = (count) in let count:nat = va_g in va_QEmpty ((count)))))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Vale.X64.QuickCode.va_mods_t", "Vale.X64.Decls.va_state", "Vale.SHA.SHA_helpers.hash256", "Vale.X64.Memory.buffer128", "Prims.nat", "Vale.X64.QuickCodes.qblock", "Prims.Cons", "Vale.X64.Decls.va_code", "Vale.X64.Machine_s.While", "Vale.X64.Decls.ins", "Vale.X64.Decls.ocmp", "Vale.X64.QuickCodes.cmp_to_ocmp", "Vale.X64.QuickCodes.Cmp_gt", "Vale.X64.Decls.va_op_cmp_reg64", "Vale.X64.Machine_s.rRdx", "Vale.X64.Decls.va_const_cmp", "Vale.X64.QuickCodes.block", "Vale.SHA.X64.va_code_Loop_body0", "Prims.Nil", "Vale.X64.Machine_s.precode", "Vale.X64.QuickCodes.va_QBind", "Vale.X64.QuickCodes.va_range1", "Vale.X64.QuickCodes.va_qWhile", "Vale.Def.Types_s.nat64", "Vale.SHA.X64.va_quick_Loop_body0", "Vale.X64.QuickCodes.va_QEmpty", "Vale.X64.QuickCodes.quickCodes", "Vale.X64.QuickCode.quickCode", "Prims.l_and", "Prims.b2t", "Vale.X64.Decls.va_get_ok", "Vale.X64.CPU_Features_s.sha_enabled", "Vale.X64.CPU_Features_s.sse_enabled", "Vale.X64.Decls.validSrcAddrs128", "Vale.X64.Decls.va_get_mem_heaplet", "Vale.X64.Decls.va_get_reg64", "Vale.X64.Machine_s.rRsi", "Prims.op_Multiply", "Vale.X64.Decls.va_get_mem_layout", "Vale.Arch.HeapTypes_s.Secret", "Vale.X64.Machine_s.rRcx", "Prims.op_LessThan", "Prims.op_Addition", "Vale.X64.Machine_s.pow2_64", "Prims.eq2", "Prims.int", "Prims.op_Subtraction", "Vale.Def.Words_s.four", "Vale.Def.Types_s.nat32", "Vale.X64.Decls.va_get_xmm", "Vale.Def.Words_s.Mkfour", "Vale.SHA.SHA_helpers.k_reqs", "Vale.X64.Decls.buffer128_as_seq", "Vale.SHA.SHA_helpers.make_hash", "Vale.SHA.SHA_helpers.update_multi_quads", "FStar.Seq.Base.seq", "Vale.Def.Types_s.quad32", "Vale.Arch.Types.reverse_bytes_nat32_quad32_seq", "FStar.Seq.Base.slice", "Vale.X64.Decls.quad32", "Vale.X64.State.vale_state", "Vale.X64.QuickCode.va_quickCode", "Vale.SHA.X64.va_code_Loop_while0" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ()))) val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_body0 () = (va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_body0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 578 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds in_b k_b (count `op_Multiply` 4) hash_orig) (fun (va_s:va_state) _ -> let (count:nat) = count + 1 in va_QEmpty ((count))))) val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_body0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_body0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_body0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 576 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0 /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_body0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_body0 (va_code_Loop_body0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_body0 ())) = (va_QProc (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop_while0 val va_code_Loop_while0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_while0 () = (va_Block (va_CCons (va_While (va_cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (va_Block (va_CCons (va_code_Loop_body0 ()) (va_CNil ())))) (va_CNil ()))) val va_codegen_success_Loop_while0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_while0 () = (va_pbool_and (va_codegen_success_Loop_body0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_while0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat)
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_qcode_Loop_while0 (va_mods: va_mods_t) (va_old: va_state) (va_in_hash_orig: hash256) (va_in_in_b va_in_k_b: buffer128) (va_in_count: nat) : (va_quickCode (nat) (va_code_Loop_while0 ()))
[]
Vale.SHA.X64.va_qcode_Loop_while0
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_mods: Vale.X64.QuickCode.va_mods_t -> va_old: Vale.X64.Decls.va_state -> va_in_hash_orig: Vale.SHA.SHA_helpers.hash256 -> va_in_in_b: Vale.X64.Memory.buffer128 -> va_in_k_b: Vale.X64.Memory.buffer128 -> va_in_count: Prims.nat -> Vale.X64.QuickCode.va_quickCode Prims.nat (Vale.SHA.X64.va_code_Loop_while0 ())
{ "end_col": 91, "end_line": 1726, "start_col": 2, "start_line": 1700 }
Prims.Tot
val va_quick_Loop (in_b k_b: buffer128) : (va_quickCode unit (va_code_Loop ()))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_quick_Loop (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (va_QProc (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop in_b k_b) (va_wpProof_Loop in_b k_b))
val va_quick_Loop (in_b k_b: buffer128) : (va_quickCode unit (va_code_Loop ())) let va_quick_Loop (in_b k_b: buffer128) : (va_quickCode unit (va_code_Loop ())) =
false
null
false
(va_QProc (va_code_Loop ()) ([ va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi ]) (va_wp_Loop in_b k_b) (va_wpProof_Loop in_b k_b))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Vale.X64.Memory.buffer128", "Vale.X64.QuickCode.va_QProc", "Prims.unit", "Vale.SHA.X64.va_code_Loop", "Prims.Cons", "Vale.X64.QuickCode.mod_t", "Vale.X64.QuickCode.va_Mod_flags", "Vale.X64.QuickCode.va_Mod_xmm", "Vale.X64.QuickCode.va_Mod_reg64", "Vale.X64.Machine_s.rRdx", "Vale.X64.Machine_s.rRsi", "Prims.Nil", "Vale.SHA.X64.va_wp_Loop", "Vale.SHA.X64.va_wpProof_Loop", "Vale.X64.QuickCode.va_quickCode" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ()))) val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_body0 () = (va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_body0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 578 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds in_b k_b (count `op_Multiply` 4) hash_orig) (fun (va_s:va_state) _ -> let (count:nat) = count + 1 in va_QEmpty ((count))))) val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_body0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_body0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_body0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 576 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0 /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_body0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_body0 (va_code_Loop_body0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_body0 ())) = (va_QProc (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop_while0 val va_code_Loop_while0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_while0 () = (va_Block (va_CCons (va_While (va_cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (va_Block (va_CCons (va_code_Loop_body0 ()) (va_CNil ())))) (va_CNil ()))) val va_codegen_success_Loop_while0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_while0 () = (va_pbool_and (va_codegen_success_Loop_body0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_while0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_while0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qWhile va_mods (Cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (fun va_g -> let (count:nat) = let count = va_g in count in qblock va_mods (fun (va_s:va_state) -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_body0 va_old hash_orig in_b k_b count) (fun (va_s:va_state) (count:nat) -> va_QEmpty ((count))))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_ok va_s /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRsi va_old) in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRcx va_s) k_b 16 (va_get_mem_layout va_s) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_s == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_reg64 rRdx va_s) ((count))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in let va_g = (count) in let (count:nat) = va_g in va_QEmpty ((count))))) val va_lemma_Loop_while0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_while0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig))) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_while0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_while0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_while0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~(va_get_reg64 rRdx va_sM > 0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_while0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_while0 (va_code_Loop_while0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_while0 ())) = (va_QProc (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop val va_code_Loop : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop () = (va_Block (va_CCons (va_code_Loop_while0 ()) (va_CNil ()))) val va_codegen_success_Loop : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop () = (va_pbool_and (va_codegen_success_Loop_while0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (count:nat) = 0 in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 556 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_while0 va_old_s hash_orig in_b k_b count) (fun (va_s:va_state) count -> va_QEmpty (())))) val va_lemma_Loop : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop va_b0 va_s0 in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop va_mods in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 547 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 548 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == 0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 551 column 90 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) ==> va_k va_sM (()))) val va_wpProof_Loop : in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop (va_code_Loop ()) va_s0 in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr]
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_quick_Loop (in_b k_b: buffer128) : (va_quickCode unit (va_code_Loop ()))
[]
Vale.SHA.X64.va_quick_Loop
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
in_b: Vale.X64.Memory.buffer128 -> k_b: Vale.X64.Memory.buffer128 -> Vale.X64.QuickCode.va_quickCode Prims.unit (Vale.SHA.X64.va_code_Loop ())
{ "end_col": 92, "end_line": 2026, "start_col": 2, "start_line": 2024 }
Prims.Tot
val va_wp_Loop (in_b k_b: buffer128) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_wp_Loop (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) ==> va_k va_sM (())))
val va_wp_Loop (in_b k_b: buffer128) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0 let va_wp_Loop (in_b k_b: buffer128) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0 =
false
null
false
(va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` (va_get_reg64 rRdx va_s0)) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` (va_get_reg64 rRdx va_s0) < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi: nat64) (va_x_rdx: nat64) (va_x_xmm0: quad32) (va_x_xmm1: quad32) (va_x_xmm2: quad32) (va_x_xmm3: quad32) (va_x_xmm4: quad32) (va_x_xmm5: quad32) (va_x_xmm6: quad32) (va_x_xmm7: quad32) (va_x_xmm9: quad32) (va_x_xmm10: quad32) (va_x_efl: Vale.X64.Flags.t). let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` (va_get_reg64 rRdx va_s0) /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` (va_get_reg64 rRdx va_s0)) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) ==> va_k va_sM (())))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Vale.X64.Memory.buffer128", "Vale.X64.Decls.va_state", "Prims.unit", "Prims.l_and", "Prims.b2t", "Vale.X64.Decls.va_get_ok", "Vale.X64.CPU_Features_s.sha_enabled", "Vale.X64.CPU_Features_s.sse_enabled", "Vale.X64.Decls.validSrcAddrs128", "Vale.X64.Decls.va_get_mem_heaplet", "Vale.X64.Decls.va_get_reg64", "Vale.X64.Machine_s.rRsi", "Prims.op_Multiply", "Vale.X64.Machine_s.rRdx", "Vale.X64.Decls.va_get_mem_layout", "Vale.Arch.HeapTypes_s.Secret", "Vale.X64.Machine_s.rRcx", "Prims.op_LessThan", "Prims.op_Addition", "Vale.X64.Machine_s.pow2_64", "Prims.eq2", "Vale.Def.Words_s.four", "Vale.Def.Types_s.nat32", "Vale.X64.Decls.va_get_xmm", "Vale.Def.Words_s.Mkfour", "Vale.SHA.SHA_helpers.k_reqs", "Vale.X64.Decls.buffer128_as_seq", "Prims.l_Forall", "Vale.X64.Memory.nat64", "Vale.X64.Decls.quad32", "Vale.X64.Flags.t", "Prims.l_imp", "Prims.int", "Vale.SHA.SHA_helpers.hash256", "Vale.SHA.SHA_helpers.make_hash", "Vale.SHA.SHA_helpers.update_multi_quads", "FStar.Seq.Base.seq", "Vale.Def.Types_s.quad32", "Vale.Arch.Types.reverse_bytes_nat32_quad32_seq", "FStar.Seq.Base.slice", "Vale.X64.State.vale_state", "Vale.X64.Decls.va_upd_flags", "Vale.X64.Decls.va_upd_xmm", "Vale.X64.Decls.va_upd_reg64" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ()))) val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_body0 () = (va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_body0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 578 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds in_b k_b (count `op_Multiply` 4) hash_orig) (fun (va_s:va_state) _ -> let (count:nat) = count + 1 in va_QEmpty ((count))))) val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_body0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_body0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_body0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 576 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0 /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_body0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_body0 (va_code_Loop_body0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_body0 ())) = (va_QProc (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop_while0 val va_code_Loop_while0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_while0 () = (va_Block (va_CCons (va_While (va_cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (va_Block (va_CCons (va_code_Loop_body0 ()) (va_CNil ())))) (va_CNil ()))) val va_codegen_success_Loop_while0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_while0 () = (va_pbool_and (va_codegen_success_Loop_body0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_while0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_while0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qWhile va_mods (Cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (fun va_g -> let (count:nat) = let count = va_g in count in qblock va_mods (fun (va_s:va_state) -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_body0 va_old hash_orig in_b k_b count) (fun (va_s:va_state) (count:nat) -> va_QEmpty ((count))))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_ok va_s /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRsi va_old) in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRcx va_s) k_b 16 (va_get_mem_layout va_s) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_s == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_reg64 rRdx va_s) ((count))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in let va_g = (count) in let (count:nat) = va_g in va_QEmpty ((count))))) val va_lemma_Loop_while0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_while0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig))) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_while0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_while0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_while0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~(va_get_reg64 rRdx va_sM > 0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_while0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_while0 (va_code_Loop_while0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_while0 ())) = (va_QProc (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop val va_code_Loop : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop () = (va_Block (va_CCons (va_code_Loop_while0 ()) (va_CNil ()))) val va_codegen_success_Loop : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop () = (va_pbool_and (va_codegen_success_Loop_while0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (count:nat) = 0 in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 556 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_while0 va_old_s hash_orig in_b k_b count) (fun (va_s:va_state) count -> va_QEmpty (())))) val va_lemma_Loop : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop va_b0 va_s0 in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop va_mods in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 547 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 548 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == 0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 551 column 90 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0))
false
true
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_wp_Loop (in_b k_b: buffer128) (va_s0: va_state) (va_k: (va_state -> unit -> Type0)) : Type0
[]
Vale.SHA.X64.va_wp_Loop
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
in_b: Vale.X64.Memory.buffer128 -> k_b: Vale.X64.Memory.buffer128 -> va_s0: Vale.X64.Decls.va_state -> va_k: (_: Vale.X64.Decls.va_state -> _: Prims.unit -> Type0) -> Type0
{ "end_col": 56, "end_line": 1996, "start_col": 2, "start_line": 1975 }
Prims.Tot
val va_quick_Epilogue (ctx_b: buffer128) : (va_quickCode unit (va_code_Epilogue ()))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_quick_Epilogue (ctx_b:buffer128) : (va_quickCode unit (va_code_Epilogue ())) = (va_QProc (va_code_Epilogue ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) (va_wp_Epilogue ctx_b) (va_wpProof_Epilogue ctx_b))
val va_quick_Epilogue (ctx_b: buffer128) : (va_quickCode unit (va_code_Epilogue ())) let va_quick_Epilogue (ctx_b: buffer128) : (va_quickCode unit (va_code_Epilogue ())) =
false
null
false
(va_QProc (va_code_Epilogue ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) (va_wp_Epilogue ctx_b) (va_wpProof_Epilogue ctx_b))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Vale.X64.Memory.buffer128", "Vale.X64.QuickCode.va_QProc", "Prims.unit", "Vale.SHA.X64.va_code_Epilogue", "Prims.Cons", "Vale.X64.QuickCode.mod_t", "Vale.X64.QuickCode.va_Mod_flags", "Vale.X64.QuickCode.va_Mod_mem_heaplet", "Vale.X64.QuickCode.va_Mod_xmm", "Vale.X64.QuickCode.va_Mod_mem", "Prims.Nil", "Vale.SHA.X64.va_wp_Epilogue", "Vale.SHA.X64.va_wpProof_Epilogue", "Vale.X64.QuickCode.va_quickCode" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ()))) val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_body0 () = (va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_body0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 578 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds in_b k_b (count `op_Multiply` 4) hash_orig) (fun (va_s:va_state) _ -> let (count:nat) = count + 1 in va_QEmpty ((count))))) val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_body0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_body0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_body0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 576 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0 /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_body0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_body0 (va_code_Loop_body0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_body0 ())) = (va_QProc (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop_while0 val va_code_Loop_while0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_while0 () = (va_Block (va_CCons (va_While (va_cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (va_Block (va_CCons (va_code_Loop_body0 ()) (va_CNil ())))) (va_CNil ()))) val va_codegen_success_Loop_while0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_while0 () = (va_pbool_and (va_codegen_success_Loop_body0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_while0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_while0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qWhile va_mods (Cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (fun va_g -> let (count:nat) = let count = va_g in count in qblock va_mods (fun (va_s:va_state) -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_body0 va_old hash_orig in_b k_b count) (fun (va_s:va_state) (count:nat) -> va_QEmpty ((count))))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_ok va_s /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRsi va_old) in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRcx va_s) k_b 16 (va_get_mem_layout va_s) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_s == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_reg64 rRdx va_s) ((count))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in let va_g = (count) in let (count:nat) = va_g in va_QEmpty ((count))))) val va_lemma_Loop_while0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_while0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig))) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_while0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_while0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_while0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~(va_get_reg64 rRdx va_sM > 0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_while0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_while0 (va_code_Loop_while0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_while0 ())) = (va_QProc (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop val va_code_Loop : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop () = (va_Block (va_CCons (va_code_Loop_while0 ()) (va_CNil ()))) val va_codegen_success_Loop : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop () = (va_pbool_and (va_codegen_success_Loop_while0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (count:nat) = 0 in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 556 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_while0 va_old_s hash_orig in_b k_b count) (fun (va_s:va_state) count -> va_QEmpty (())))) val va_lemma_Loop : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop va_b0 va_s0 in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop va_mods in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 547 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 548 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == 0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 551 column 90 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) ==> va_k va_sM (()))) val va_wpProof_Loop : in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop (va_code_Loop ()) va_s0 in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (va_QProc (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop in_b k_b) (va_wpProof_Loop in_b k_b)) //-- //-- Epilogue val va_code_Epilogue : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Epilogue () = (va_Block (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_CNil ()))))))))) val va_codegen_success_Epilogue : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Epilogue () = (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_ttrue ())))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Epilogue (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Epilogue ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 612 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 613 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 614 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 616 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 617 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 619 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret ctx_b 0) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 620 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret ctx_b 1) (fun (va_s:va_state) _ -> let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 623 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_old_s) (va_get_xmm 2 va_old_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))) val va_lemma_Epilogue : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Epilogue ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Epilogue va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Epilogue va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Epilogue ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 583 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 603 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 606 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Epilogue (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_mem:vale_heap) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_heap0:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_mem va_x_mem va_s0))))) in va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) ==> va_k va_sM (()))) val va_wpProof_Epilogue : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Epilogue ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Epilogue ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Epilogue ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Epilogue (va_code_Epilogue ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr]
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_quick_Epilogue (ctx_b: buffer128) : (va_quickCode unit (va_code_Epilogue ()))
[]
Vale.SHA.X64.va_quick_Epilogue
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
ctx_b: Vale.X64.Memory.buffer128 -> Vale.X64.QuickCode.va_quickCode Prims.unit (Vale.SHA.X64.va_code_Epilogue ())
{ "end_col": 82, "end_line": 2166, "start_col": 2, "start_line": 2165 }
Prims.Tot
val va_qcode_Loop_rounds_0_15 (va_mods: va_mods_t) (in_b k_b: buffer128) (offset: nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ()))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (())))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
val va_qcode_Loop_rounds_0_15 (va_mods: va_mods_t) (in_b k_b: buffer128) (offset: nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) let va_qcode_Loop_rounds_0_15 (va_mods: va_mods_t) (in_b k_b: buffer128) (offset: nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) =
false
null
false
(qblock va_mods (fun (va_s: va_state) -> let va_old_s:va_state = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583: (FStar.Seq.Base.seq a_1582)) (i_1584: Prims.nat) (j_1585: Prims.nat) -> let j_1545:Prims.nat = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let block:block_w = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_: unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let hash_orig:Vale.SHA.SHA_helpers.hash256 = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let va_arg79:Vale.SHA.SHA_helpers.block_w = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_: unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s: va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337: (FStar.Seq.Base.seq a_336)) (i_338: Prims.nat) -> let i_312:Prims.nat = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s: va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337: (FStar.Seq.Base.seq a_336)) (i_338: Prims.nat) -> let i_312:Prims.nat = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s: va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337: (FStar.Seq.Base.seq a_336) ) (i_338: Prims.nat) -> let i_312:Prims.nat = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337 ))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10 ) (va_op_xmm_xmm 2 )) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 ( va_op_xmm_xmm 2 ) ( va_op_xmm_xmm 1 ) 0 block hash_orig ) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_quick_Pshufd ( va_op_xmm_xmm 0 ) ( va_op_xmm_xmm 0 ) 14 ) ( va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_quick_Mov128 ( va_op_xmm_xmm 9 ) ( va_op_xmm_xmm 1 ) ) ( va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_quick_SHA256_rnds2 ( va_op_xmm_xmm 1 ) ( va_op_xmm_xmm 2 ) 2 block hash_orig ) ( va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_quick_Load128_buffer ( va_op_heaplet_mem_heaplet 0 ) ( va_op_xmm_xmm 0 ) ( va_op_reg_opr64_reg64 rRcx ) 16 Secret k_b 1 ) ( fun ( va_s: va_state ) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( ( fun a_336 ( s_337: ( FStar.Seq.Base.seq a_336 ) ) ( i_338: Prims.nat ) -> let i_312:Prims.nat = i_338 in Prims.b2t ( Prims.op_LessThan i_312 ( FStar.Seq.Base.length #a_336 s_337 ) ) ) Vale.X64.Decls.quad32 ks 1 ) ( fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1 ) ( va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_quick_Paddd ( va_op_xmm_xmm 0 ) ( va_op_xmm_xmm 4 ) ) ( va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_quick_PshufbStable ( va_op_xmm_xmm 5 ) ( va_op_xmm_xmm 7 ) ) ( fun ( va_s: va_state ) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( ( fun a_336 ( s_337: ( FStar.Seq.Base.seq a_336 ) ) ( i_338: Prims.nat ) -> let i_312:Prims.nat = i_338 in Prims.b2t ( Prims.op_LessThan i_312 ( FStar.Seq.Base.length #a_336 s_337 ) ) ) Vale.Def.Types_s.quad32 input_BE 2 ) ( fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2 ) ( va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_quick_SHA256_rnds2 ( va_op_xmm_xmm 2 ) ( va_op_xmm_xmm 1 ) 4 block hash_orig ) ( va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_quick_Pshufd ( va_op_xmm_xmm 0 ) ( va_op_xmm_xmm 0 ) 14 ) ( va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_quick_Add64 ( va_op_dst_opr64_reg64 rRsi ) ( va_const_opr64 64 ) ) ( va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_quick_SHA256_msg1 ( va_op_xmm_xmm 3 ) ( va_op_xmm_xmm 4 ) 16 block ) ( va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_quick_SHA256_rnds2 ( va_op_xmm_xmm 1 ) ( va_op_xmm_xmm 2 ) 6 block hash_orig ) ( va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_quick_Load128_buffer ( va_op_heaplet_mem_heaplet 0 ) ( va_op_xmm_xmm 0 ) ( va_op_reg_opr64_reg64 rRcx ) 32 Secret k_b 2 ) ( fun ( va_s: va_state ) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( ( fun a_336 ( s_337: ( FStar.Seq.Base.seq a_336 ) ) ( i_338: Prims.nat ) -> let i_312:Prims.nat = i_338 in Prims.b2t ( Prims.op_LessThan i_312 ( FStar.Seq.Base.length #a_336 s_337 ) ) ) Vale.X64.Decls.quad32 ks 2 ) ( fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2 ) ( va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_quick_Paddd ( va_op_xmm_xmm 0 ) ( va_op_xmm_xmm 5 ) ) ( va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_quick_PshufbStable ( va_op_xmm_xmm 6 ) ( va_op_xmm_xmm 7 ) ) ( fun ( va_s: va_state ) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( ( fun a_336 ( s_337: ( FStar.Seq.Base.seq a_336 ) ) ( i_338: Prims.nat ) -> let i_312:Prims.nat = i_338 in Prims.b2t ( Prims.op_LessThan i_312 ( FStar.Seq.Base.length #a_336 s_337 ) ) ) Vale.Def.Types_s.quad32 input_BE 3 ) ( fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3 ) ( va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_quick_SHA256_rnds2 ( va_op_xmm_xmm 2 ) ( va_op_xmm_xmm 1 ) 8 block hash_orig ) ( va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_quick_Pshufd ( va_op_xmm_xmm 0 ) ( va_op_xmm_xmm 0 ) 14 ) ( va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_quick_Mov128 ( va_op_xmm_xmm 7 ) ( va_op_xmm_xmm 6 ) ) ( va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_quick_Palignr4 ( va_op_xmm_xmm 7 ) ( va_op_xmm_xmm 5 ) ) ( va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_quick_Paddd ( va_op_xmm_xmm 3 ) ( va_op_xmm_xmm 7 ) ) ( va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_quick_SHA256_msg1 ( va_op_xmm_xmm 4 ) ( va_op_xmm_xmm 5 ) 20 block ) ( va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_quick_SHA256_rnds2 ( va_op_xmm_xmm 1 ) ( va_op_xmm_xmm 2 ) 10 block hash_orig ) ( va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_quick_Load128_buffer ( va_op_heaplet_mem_heaplet 0 ) ( va_op_xmm_xmm 0 ) ( va_op_reg_opr64_reg64 rRcx ) 48 Secret k_b 3 ) ( fun ( va_s: va_state ) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( ( fun a_336 ( s_337: ( FStar.Seq.Base.seq a_336 ) ) ( i_338: Prims.nat ) -> let i_312:Prims.nat = i_338 in Prims.b2t ( Prims.op_LessThan i_312 ( FStar.Seq.Base.length #a_336 s_337 ) ) ) Vale.X64.Decls.quad32 ks 3 ) ( fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3 ) ( va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_quick_Paddd ( va_op_xmm_xmm 0 ) ( va_op_xmm_xmm 6 ) ) ( va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_quick_SHA256_msg2 ( va_op_xmm_xmm 3 ) ( va_op_xmm_xmm 6 ) 16 block ) ( va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_quick_SHA256_rnds2 ( va_op_xmm_xmm 2 ) ( va_op_xmm_xmm 1 ) 12 block hash_orig ) ( va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_quick_Pshufd ( va_op_xmm_xmm 0 ) ( va_op_xmm_xmm 0 ) 14 ) ( va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_quick_Mov128 ( va_op_xmm_xmm 7 ) ( va_op_xmm_xmm 3 ) ) ( va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_quick_Palignr4 ( va_op_xmm_xmm 7 ) ( va_op_xmm_xmm 6 ) ) ( va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_quick_Paddd ( va_op_xmm_xmm 4 ) ( va_op_xmm_xmm 7 ) ) ( va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_quick_SHA256_msg1 ( va_op_xmm_xmm 5 ) ( va_op_xmm_xmm 6 ) 24 block ) ( va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ( va_quick_SHA256_rnds2 ( va_op_xmm_xmm 1 ) ( va_op_xmm_xmm 2 ) 14 block hash_orig ) ( va_QEmpty ( () ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )) )))))))))))) )))))))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Vale.X64.QuickCode.va_mods_t", "Vale.X64.Memory.buffer128", "Prims.nat", "Vale.X64.QuickCodes.qblock", "Prims.unit", "Prims.Cons", "Vale.X64.Decls.va_code", "Vale.X64.Machine_s.Block", "Vale.X64.Decls.ins", "Vale.X64.Decls.ocmp", "Prims.Nil", "Vale.X64.Machine_s.precode", "Vale.X64.InsVector.va_code_Load128_buffer", "Vale.X64.Decls.va_op_heaplet_mem_heaplet", "Vale.X64.Decls.va_op_xmm_xmm", "Vale.X64.Decls.va_op_reg_opr64_reg64", "Vale.X64.Machine_s.rRsi", "Vale.Arch.HeapTypes_s.Secret", "Vale.X64.InsVector.va_code_PshufbStable", "Vale.X64.Machine_s.rRcx", "Vale.X64.InsVector.va_code_Paddd", "Vale.X64.InsVector.va_code_Mov128", "Vale.X64.InsSha.va_code_SHA256_rnds2", "Vale.X64.InsVector.va_code_Pshufd", "Vale.X64.InsBasic.va_code_Add64", "Vale.X64.Decls.va_op_dst_opr64_reg64", "Vale.X64.Decls.va_const_opr64", "Vale.X64.InsSha.va_code_SHA256_msg1", "Vale.X64.InsVector.va_code_Palignr4", "Vale.X64.InsSha.va_code_SHA256_msg2", "Vale.X64.Decls.va_state", "Vale.X64.QuickCodes.va_qAssertSquash", "Vale.X64.QuickCodes.va_range1", "Prims.b2t", "Prims.op_AmpAmp", "Prims.op_LessThanOrEqual", "FStar.Seq.Base.length", "Vale.X64.Decls.quad32", "Vale.X64.Decls.buffer128_as_seq", "Vale.X64.Decls.va_get_mem_heaplet", "Prims.op_Addition", "Prims.squash", "Vale.X64.QuickCodes.va_qPURE", "Prims.pure_post", "Prims.l_and", "Prims.eq2", "Prims.int", "Vale.Def.Types_s.quad32", "Prims.l_Forall", "Prims.l_imp", "Prims.op_GreaterThanOrEqual", "Prims.op_LessThan", "Vale.Def.Words_s.nat32", "Vale.Def.Words_s.__proj__Mkfour__item__lo0", "FStar.Seq.Base.index", "Vale.SHA.SHA_helpers.ws_opaque", "Vale.SHA.SHA_helpers.quads_to_block", "Prims.op_Multiply", "Vale.Def.Words_s.__proj__Mkfour__item__lo1", "Vale.Def.Words_s.__proj__Mkfour__item__hi2", "Vale.Def.Words_s.__proj__Mkfour__item__hi3", "Vale.SHA.SHA_helpers.ws_quad32", "Vale.SHA.SHA_helpers.lemma_quads_to_block", "Prims.l_True", "Vale.SHA.SHA_helpers.hash256", "Spec.Loops.repeat_range", "Vale.SHA.SHA_helpers.shuffle_core_opaque", "Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale", "Vale.X64.QuickCodes.va_QSeq", "Vale.X64.InsVector.va_quick_Load128_buffer", "Vale.X64.QuickCodes.va_QBind", "Vale.X64.InsVector.va_quick_PshufbStable", "Vale.X64.QuickCodes.va_qAssert", "Vale.X64.Decls.va_get_xmm", "Vale.X64.InsVector.va_quick_Paddd", "Vale.X64.InsVector.va_quick_Mov128", "Vale.X64.InsSha.va_quick_SHA256_rnds2", "Vale.X64.InsVector.va_quick_Pshufd", "Vale.X64.InsBasic.va_quick_Add64", "Vale.X64.InsSha.va_quick_SHA256_msg1", "Vale.X64.InsVector.va_quick_Palignr4", "Vale.X64.InsSha.va_quick_SHA256_msg2", "Vale.X64.QuickCodes.va_QEmpty", "Vale.X64.QuickCodes.quickCodes", "FStar.Seq.Base.seq", "Vale.SHA.SHA_helpers.block_w", "Vale.SHA.SHA_helpers.make_hash", "Vale.Arch.Types.reverse_bytes_nat32_quad32_seq", "FStar.Seq.Base.slice", "Vale.X64.State.vale_state", "Vale.X64.QuickCode.va_quickCode", "Vale.SHA.X64.va_code_Loop_rounds_0_15" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) :
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_qcode_Loop_rounds_0_15 (va_mods: va_mods_t) (in_b k_b: buffer128) (offset: nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ()))
[]
Vale.SHA.X64.va_qcode_Loop_rounds_0_15
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_mods: Vale.X64.QuickCode.va_mods_t -> in_b: Vale.X64.Memory.buffer128 -> k_b: Vale.X64.Memory.buffer128 -> offset: Prims.nat -> Vale.X64.QuickCode.va_quickCode Prims.unit (Vale.SHA.X64.va_code_Loop_rounds_0_15 ())
{ "end_col": 70, "end_line": 463, "start_col": 2, "start_line": 289 }
Prims.Ghost
val va_wpProof_Epilogue : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Epilogue ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Epilogue ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g))))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_wpProof_Epilogue ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Epilogue (va_code_Epilogue ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
val va_wpProof_Epilogue : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Epilogue ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Epilogue ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g)))) let va_wpProof_Epilogue ctx_b va_s0 va_k =
false
null
false
let va_sM, va_f0 = va_lemma_Epilogue (va_code_Epilogue ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))); va_lemma_norm_mods ([ va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem ]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[]
[ "Vale.X64.Memory.buffer128", "Vale.X64.Decls.va_state", "Prims.unit", "Vale.X64.Decls.va_fuel", "FStar.Pervasives.Native.Mktuple3", "Vale.X64.QuickCode.va_lemma_norm_mods", "Prims.Cons", "Vale.X64.QuickCode.mod_t", "Vale.X64.QuickCode.va_Mod_flags", "Vale.X64.QuickCode.va_Mod_mem_heaplet", "Vale.X64.QuickCode.va_Mod_xmm", "Vale.X64.QuickCode.va_Mod_mem", "Prims.Nil", "Prims._assert", "Vale.X64.Decls.va_state_eq", "Vale.X64.Decls.va_update_flags", "Vale.X64.Decls.va_update_mem_heaplet", "Vale.X64.Decls.va_update_xmm", "Vale.X64.Decls.va_update_ok", "Vale.X64.Decls.va_update_mem", "Vale.X64.Decls.va_lemma_upd_update", "FStar.Pervasives.Native.tuple3", "FStar.Pervasives.Native.tuple2", "Vale.X64.State.vale_state", "Vale.SHA.X64.va_lemma_Epilogue", "Vale.SHA.X64.va_code_Epilogue" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ()))) val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_body0 () = (va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_body0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 578 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds in_b k_b (count `op_Multiply` 4) hash_orig) (fun (va_s:va_state) _ -> let (count:nat) = count + 1 in va_QEmpty ((count))))) val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_body0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_body0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_body0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 576 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0 /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_body0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_body0 (va_code_Loop_body0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_body0 ())) = (va_QProc (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop_while0 val va_code_Loop_while0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_while0 () = (va_Block (va_CCons (va_While (va_cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (va_Block (va_CCons (va_code_Loop_body0 ()) (va_CNil ())))) (va_CNil ()))) val va_codegen_success_Loop_while0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_while0 () = (va_pbool_and (va_codegen_success_Loop_body0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_while0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_while0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qWhile va_mods (Cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (fun va_g -> let (count:nat) = let count = va_g in count in qblock va_mods (fun (va_s:va_state) -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_body0 va_old hash_orig in_b k_b count) (fun (va_s:va_state) (count:nat) -> va_QEmpty ((count))))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_ok va_s /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRsi va_old) in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRcx va_s) k_b 16 (va_get_mem_layout va_s) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_s == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_reg64 rRdx va_s) ((count))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in let va_g = (count) in let (count:nat) = va_g in va_QEmpty ((count))))) val va_lemma_Loop_while0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_while0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig))) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_while0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_while0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_while0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~(va_get_reg64 rRdx va_sM > 0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_while0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_while0 (va_code_Loop_while0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_while0 ())) = (va_QProc (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop val va_code_Loop : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop () = (va_Block (va_CCons (va_code_Loop_while0 ()) (va_CNil ()))) val va_codegen_success_Loop : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop () = (va_pbool_and (va_codegen_success_Loop_while0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (count:nat) = 0 in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 556 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_while0 va_old_s hash_orig in_b k_b count) (fun (va_s:va_state) count -> va_QEmpty (())))) val va_lemma_Loop : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop va_b0 va_s0 in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop va_mods in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 547 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 548 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == 0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 551 column 90 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) ==> va_k va_sM (()))) val va_wpProof_Loop : in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop (va_code_Loop ()) va_s0 in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (va_QProc (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop in_b k_b) (va_wpProof_Loop in_b k_b)) //-- //-- Epilogue val va_code_Epilogue : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Epilogue () = (va_Block (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_CNil ()))))))))) val va_codegen_success_Epilogue : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Epilogue () = (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_ttrue ())))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Epilogue (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Epilogue ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 612 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 613 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 614 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 616 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 617 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 619 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret ctx_b 0) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 620 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret ctx_b 1) (fun (va_s:va_state) _ -> let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 623 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_old_s) (va_get_xmm 2 va_old_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))) val va_lemma_Epilogue : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Epilogue ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Epilogue va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Epilogue va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Epilogue ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 583 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 603 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 606 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Epilogue (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_mem:vale_heap) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_heap0:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_mem va_x_mem va_s0))))) in va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) ==> va_k va_sM (()))) val va_wpProof_Epilogue : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Epilogue ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Epilogue ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g))))
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_wpProof_Epilogue : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Epilogue ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Epilogue ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g))))
[]
Vale.SHA.X64.va_wpProof_Epilogue
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
ctx_b: Vale.X64.Memory.buffer128 -> va_s0: Vale.X64.Decls.va_state -> va_k: (_: Vale.X64.Decls.va_state -> _: Prims.unit -> Type0) -> Prims.Ghost ((Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel) * Prims.unit)
{ "end_col": 22, "end_line": 2161, "start_col": 42, "start_line": 2152 }
Prims.Tot
val va_quick_Sha_update (ctx_b in_b k_b: buffer128) : (va_quickCode unit (va_code_Sha_update ()))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_quick_Sha_update (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update ())) = (va_QProc (va_code_Sha_update ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) (va_wp_Sha_update ctx_b in_b k_b) (va_wpProof_Sha_update ctx_b in_b k_b))
val va_quick_Sha_update (ctx_b in_b k_b: buffer128) : (va_quickCode unit (va_code_Sha_update ())) let va_quick_Sha_update (ctx_b in_b k_b: buffer128) : (va_quickCode unit (va_code_Sha_update ())) =
false
null
false
(va_QProc (va_code_Sha_update ()) ([ va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem ]) (va_wp_Sha_update ctx_b in_b k_b) (va_wpProof_Sha_update ctx_b in_b k_b))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Vale.X64.Memory.buffer128", "Vale.X64.QuickCode.va_QProc", "Prims.unit", "Vale.SHA.X64.va_code_Sha_update", "Prims.Cons", "Vale.X64.QuickCode.mod_t", "Vale.X64.QuickCode.va_Mod_flags", "Vale.X64.QuickCode.va_Mod_mem_heaplet", "Vale.X64.QuickCode.va_Mod_xmm", "Vale.X64.QuickCode.va_Mod_reg64", "Vale.X64.Machine_s.rRax", "Vale.X64.Machine_s.rRdx", "Vale.X64.Machine_s.rRsi", "Vale.X64.QuickCode.va_Mod_mem", "Prims.Nil", "Vale.SHA.X64.va_wp_Sha_update", "Vale.SHA.X64.va_wpProof_Sha_update", "Vale.X64.QuickCode.va_quickCode" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ()))) val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_body0 () = (va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_body0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 578 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds in_b k_b (count `op_Multiply` 4) hash_orig) (fun (va_s:va_state) _ -> let (count:nat) = count + 1 in va_QEmpty ((count))))) val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_body0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_body0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_body0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 576 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0 /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_body0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_body0 (va_code_Loop_body0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_body0 ())) = (va_QProc (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop_while0 val va_code_Loop_while0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_while0 () = (va_Block (va_CCons (va_While (va_cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (va_Block (va_CCons (va_code_Loop_body0 ()) (va_CNil ())))) (va_CNil ()))) val va_codegen_success_Loop_while0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_while0 () = (va_pbool_and (va_codegen_success_Loop_body0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_while0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_while0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qWhile va_mods (Cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (fun va_g -> let (count:nat) = let count = va_g in count in qblock va_mods (fun (va_s:va_state) -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_body0 va_old hash_orig in_b k_b count) (fun (va_s:va_state) (count:nat) -> va_QEmpty ((count))))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_ok va_s /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRsi va_old) in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRcx va_s) k_b 16 (va_get_mem_layout va_s) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_s == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_reg64 rRdx va_s) ((count))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in let va_g = (count) in let (count:nat) = va_g in va_QEmpty ((count))))) val va_lemma_Loop_while0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_while0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig))) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_while0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_while0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_while0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~(va_get_reg64 rRdx va_sM > 0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_while0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_while0 (va_code_Loop_while0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_while0 ())) = (va_QProc (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop val va_code_Loop : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop () = (va_Block (va_CCons (va_code_Loop_while0 ()) (va_CNil ()))) val va_codegen_success_Loop : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop () = (va_pbool_and (va_codegen_success_Loop_while0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (count:nat) = 0 in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 556 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_while0 va_old_s hash_orig in_b k_b count) (fun (va_s:va_state) count -> va_QEmpty (())))) val va_lemma_Loop : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop va_b0 va_s0 in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop va_mods in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 547 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 548 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == 0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 551 column 90 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) ==> va_k va_sM (()))) val va_wpProof_Loop : in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop (va_code_Loop ()) va_s0 in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (va_QProc (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop in_b k_b) (va_wpProof_Loop in_b k_b)) //-- //-- Epilogue val va_code_Epilogue : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Epilogue () = (va_Block (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_CNil ()))))))))) val va_codegen_success_Epilogue : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Epilogue () = (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_ttrue ())))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Epilogue (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Epilogue ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 612 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 613 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 614 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 616 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 617 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 619 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret ctx_b 0) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 620 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret ctx_b 1) (fun (va_s:va_state) _ -> let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 623 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_old_s) (va_get_xmm 2 va_old_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))) val va_lemma_Epilogue : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Epilogue ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Epilogue va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Epilogue va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Epilogue ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 583 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 603 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 606 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Epilogue (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_mem:vale_heap) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_heap0:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_mem va_x_mem va_s0))))) in va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) ==> va_k va_sM (()))) val va_wpProof_Epilogue : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Epilogue ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Epilogue ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Epilogue ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Epilogue (va_code_Epilogue ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Epilogue (ctx_b:buffer128) : (va_quickCode unit (va_code_Epilogue ())) = (va_QProc (va_code_Epilogue ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) (va_wp_Epilogue ctx_b) (va_wpProof_Epilogue ctx_b)) //-- //-- Sha_update val va_code_Sha_update : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Sha_update () = (va_Block (va_CCons (va_code_Preamble ()) (va_CCons (va_code_Loop ()) (va_CCons (va_code_Epilogue ()) (va_CNil ()))))) val va_codegen_success_Sha_update : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Sha_update () = (va_pbool_and (va_codegen_success_Preamble ()) (va_pbool_and (va_codegen_success_Loop ()) (va_pbool_and (va_codegen_success_Epilogue ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Sha_update (va_mods:va_mods_t) (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 667 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Preamble ctx_b) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 668 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop in_b k_b) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 669 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Epilogue ctx_b) (va_QEmpty (())))))) val va_lemma_Sha_update : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Sha_update ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))))))))))))))) [@"opaque_to_smt"] let va_lemma_Sha_update va_b0 va_s0 ctx_b in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Sha_update va_mods ctx_b in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Sha_update ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 627 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 653 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 662 column 103 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 665 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Sha_update (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_mem:vale_heap) (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_heap0:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi (va_upd_mem va_x_mem va_s0)))))))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) ==> va_k va_sM (()))) val va_wpProof_Sha_update : ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Sha_update ctx_b in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Sha_update ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Sha_update ctx_b in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Sha_update (va_code_Sha_update ()) va_s0 ctx_b in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Sha_update (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_quick_Sha_update (ctx_b in_b k_b: buffer128) : (va_quickCode unit (va_code_Sha_update ()))
[]
Vale.SHA.X64.va_quick_Sha_update
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
ctx_b: Vale.X64.Memory.buffer128 -> in_b: Vale.X64.Memory.buffer128 -> k_b: Vale.X64.Memory.buffer128 -> Vale.X64.QuickCode.va_quickCode Prims.unit (Vale.SHA.X64.va_code_Sha_update ())
{ "end_col": 96, "end_line": 2324, "start_col": 2, "start_line": 2321 }
Prims.Ghost
val va_wpProof_Sha_update : ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Sha_update ctx_b in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Sha_update ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g))))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_wpProof_Sha_update ctx_b in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Sha_update (va_code_Sha_update ()) va_s0 ctx_b in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
val va_wpProof_Sha_update : ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Sha_update ctx_b in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Sha_update ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g)))) let va_wpProof_Sha_update ctx_b in_b k_b va_s0 va_k =
false
null
false
let va_sM, va_f0 = va_lemma_Sha_update (va_code_Sha_update ()) va_s0 ctx_b in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0 ))))))))))))))))))); va_lemma_norm_mods ([ va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem ]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[]
[ "Vale.X64.Memory.buffer128", "Vale.X64.Decls.va_state", "Prims.unit", "Vale.X64.Decls.va_fuel", "FStar.Pervasives.Native.Mktuple3", "Vale.X64.QuickCode.va_lemma_norm_mods", "Prims.Cons", "Vale.X64.QuickCode.mod_t", "Vale.X64.QuickCode.va_Mod_flags", "Vale.X64.QuickCode.va_Mod_mem_heaplet", "Vale.X64.QuickCode.va_Mod_xmm", "Vale.X64.QuickCode.va_Mod_reg64", "Vale.X64.Machine_s.rRax", "Vale.X64.Machine_s.rRdx", "Vale.X64.Machine_s.rRsi", "Vale.X64.QuickCode.va_Mod_mem", "Prims.Nil", "Prims._assert", "Vale.X64.Decls.va_state_eq", "Vale.X64.Decls.va_update_flags", "Vale.X64.Decls.va_update_mem_heaplet", "Vale.X64.Decls.va_update_xmm", "Vale.X64.Decls.va_update_reg64", "Vale.X64.Decls.va_update_ok", "Vale.X64.Decls.va_update_mem", "Vale.X64.Decls.va_lemma_upd_update", "FStar.Pervasives.Native.tuple3", "FStar.Pervasives.Native.tuple2", "Vale.X64.State.vale_state", "Vale.SHA.X64.va_lemma_Sha_update", "Vale.SHA.X64.va_code_Sha_update" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ()))) val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_body0 () = (va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_body0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 578 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds in_b k_b (count `op_Multiply` 4) hash_orig) (fun (va_s:va_state) _ -> let (count:nat) = count + 1 in va_QEmpty ((count))))) val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_body0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_body0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_body0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 576 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0 /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_body0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_body0 (va_code_Loop_body0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_body0 ())) = (va_QProc (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop_while0 val va_code_Loop_while0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_while0 () = (va_Block (va_CCons (va_While (va_cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (va_Block (va_CCons (va_code_Loop_body0 ()) (va_CNil ())))) (va_CNil ()))) val va_codegen_success_Loop_while0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_while0 () = (va_pbool_and (va_codegen_success_Loop_body0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_while0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_while0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qWhile va_mods (Cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (fun va_g -> let (count:nat) = let count = va_g in count in qblock va_mods (fun (va_s:va_state) -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_body0 va_old hash_orig in_b k_b count) (fun (va_s:va_state) (count:nat) -> va_QEmpty ((count))))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_ok va_s /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRsi va_old) in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRcx va_s) k_b 16 (va_get_mem_layout va_s) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_s == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_reg64 rRdx va_s) ((count))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in let va_g = (count) in let (count:nat) = va_g in va_QEmpty ((count))))) val va_lemma_Loop_while0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_while0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig))) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_while0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_while0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_while0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~(va_get_reg64 rRdx va_sM > 0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_while0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_while0 (va_code_Loop_while0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_while0 ())) = (va_QProc (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop val va_code_Loop : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop () = (va_Block (va_CCons (va_code_Loop_while0 ()) (va_CNil ()))) val va_codegen_success_Loop : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop () = (va_pbool_and (va_codegen_success_Loop_while0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (count:nat) = 0 in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 556 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_while0 va_old_s hash_orig in_b k_b count) (fun (va_s:va_state) count -> va_QEmpty (())))) val va_lemma_Loop : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop va_b0 va_s0 in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop va_mods in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 547 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 548 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == 0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 551 column 90 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) ==> va_k va_sM (()))) val va_wpProof_Loop : in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop (va_code_Loop ()) va_s0 in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (va_QProc (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop in_b k_b) (va_wpProof_Loop in_b k_b)) //-- //-- Epilogue val va_code_Epilogue : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Epilogue () = (va_Block (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_CNil ()))))))))) val va_codegen_success_Epilogue : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Epilogue () = (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_ttrue ())))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Epilogue (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Epilogue ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 612 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 613 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 614 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 616 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 617 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 619 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret ctx_b 0) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 620 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret ctx_b 1) (fun (va_s:va_state) _ -> let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 623 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_old_s) (va_get_xmm 2 va_old_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))) val va_lemma_Epilogue : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Epilogue ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Epilogue va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Epilogue va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Epilogue ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 583 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 603 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 606 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Epilogue (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_mem:vale_heap) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_heap0:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_mem va_x_mem va_s0))))) in va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) ==> va_k va_sM (()))) val va_wpProof_Epilogue : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Epilogue ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Epilogue ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Epilogue ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Epilogue (va_code_Epilogue ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Epilogue (ctx_b:buffer128) : (va_quickCode unit (va_code_Epilogue ())) = (va_QProc (va_code_Epilogue ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) (va_wp_Epilogue ctx_b) (va_wpProof_Epilogue ctx_b)) //-- //-- Sha_update val va_code_Sha_update : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Sha_update () = (va_Block (va_CCons (va_code_Preamble ()) (va_CCons (va_code_Loop ()) (va_CCons (va_code_Epilogue ()) (va_CNil ()))))) val va_codegen_success_Sha_update : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Sha_update () = (va_pbool_and (va_codegen_success_Preamble ()) (va_pbool_and (va_codegen_success_Loop ()) (va_pbool_and (va_codegen_success_Epilogue ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Sha_update (va_mods:va_mods_t) (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 667 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Preamble ctx_b) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 668 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop in_b k_b) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 669 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Epilogue ctx_b) (va_QEmpty (())))))) val va_lemma_Sha_update : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Sha_update ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))))))))))))))) [@"opaque_to_smt"] let va_lemma_Sha_update va_b0 va_s0 ctx_b in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Sha_update va_mods ctx_b in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Sha_update ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 627 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 653 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 662 column 103 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 665 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Sha_update (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_mem:vale_heap) (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_heap0:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi (va_upd_mem va_x_mem va_s0)))))))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) ==> va_k va_sM (()))) val va_wpProof_Sha_update : ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Sha_update ctx_b in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Sha_update ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g))))
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_wpProof_Sha_update : ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Sha_update ctx_b in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Sha_update ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g))))
[]
Vale.SHA.X64.va_wpProof_Sha_update
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
ctx_b: Vale.X64.Memory.buffer128 -> in_b: Vale.X64.Memory.buffer128 -> k_b: Vale.X64.Memory.buffer128 -> va_s0: Vale.X64.Decls.va_state -> va_k: (_: Vale.X64.Decls.va_state -> _: Prims.unit -> Type0) -> Prims.Ghost ((Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel) * Prims.unit)
{ "end_col": 22, "end_line": 2316, "start_col": 53, "start_line": 2302 }
Prims.Ghost
val va_lemma_Loop : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_lemma_Loop va_b0 va_s0 in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop va_mods in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 547 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 548 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == 0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 551 column 90 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM)
val va_lemma_Loop : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) let va_lemma_Loop va_b0 va_s0 in_b k_b =
false
null
false
let va_mods:va_mods_t = [ va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok ] in let va_qc = va_qcode_Loop va_mods in_b k_b in let va_sM, va_fM, va_g = va_wp_sound_code_norm (va_code_Loop ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 547 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` (va_get_reg64 rRdx va_s0)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 548 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == 0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 551 column 90 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` (va_get_reg64 rRdx va_s0)) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([ va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok ]) va_sM va_s0; (va_sM, va_fM)
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[]
[ "Vale.X64.Decls.va_code", "Vale.X64.Decls.va_state", "Vale.X64.Memory.buffer128", "Vale.X64.QuickCodes.fuel", "Prims.unit", "FStar.Pervasives.Native.Mktuple2", "Vale.X64.Decls.va_fuel", "Vale.X64.QuickCode.va_lemma_norm_mods", "Prims.Cons", "Vale.X64.QuickCode.mod_t", "Vale.X64.QuickCode.va_Mod_flags", "Vale.X64.QuickCode.va_Mod_xmm", "Vale.X64.QuickCode.va_Mod_reg64", "Vale.X64.Machine_s.rRdx", "Vale.X64.Machine_s.rRsi", "Vale.X64.QuickCode.va_Mod_ok", "Prims.Nil", "FStar.Pervasives.assert_norm", "Prims.eq2", "Prims.list", "Vale.X64.QuickCode.__proj__QProc__item__mods", "Vale.SHA.X64.va_code_Loop", "FStar.Pervasives.Native.tuple2", "FStar.Pervasives.Native.tuple3", "Vale.X64.State.vale_state", "Vale.X64.QuickCodes.va_wp_sound_code_norm", "Prims.l_and", "Vale.X64.QuickCodes.label", "Vale.X64.QuickCodes.va_range1", "Prims.b2t", "Vale.X64.Decls.va_get_ok", "Prims.int", "Vale.X64.Decls.va_get_reg64", "Prims.op_Addition", "Prims.op_Multiply", "Vale.SHA.SHA_helpers.hash256", "Vale.SHA.SHA_helpers.make_hash", "Vale.X64.Decls.va_get_xmm", "Vale.SHA.SHA_helpers.update_multi_quads", "FStar.Seq.Base.seq", "Vale.Def.Types_s.quad32", "Vale.Arch.Types.reverse_bytes_nat32_quad32_seq", "FStar.Seq.Base.slice", "Vale.X64.Decls.quad32", "Vale.X64.Decls.buffer128_as_seq", "Vale.X64.Decls.va_get_mem_heaplet", "Vale.X64.QuickCode.quickCode", "Vale.SHA.X64.va_qcode_Loop" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ()))) val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_body0 () = (va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_body0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 578 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds in_b k_b (count `op_Multiply` 4) hash_orig) (fun (va_s:va_state) _ -> let (count:nat) = count + 1 in va_QEmpty ((count))))) val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_body0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_body0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_body0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 576 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0 /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_body0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_body0 (va_code_Loop_body0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_body0 ())) = (va_QProc (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop_while0 val va_code_Loop_while0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_while0 () = (va_Block (va_CCons (va_While (va_cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (va_Block (va_CCons (va_code_Loop_body0 ()) (va_CNil ())))) (va_CNil ()))) val va_codegen_success_Loop_while0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_while0 () = (va_pbool_and (va_codegen_success_Loop_body0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_while0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_while0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qWhile va_mods (Cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (fun va_g -> let (count:nat) = let count = va_g in count in qblock va_mods (fun (va_s:va_state) -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_body0 va_old hash_orig in_b k_b count) (fun (va_s:va_state) (count:nat) -> va_QEmpty ((count))))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_ok va_s /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRsi va_old) in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRcx va_s) k_b 16 (va_get_mem_layout va_s) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_s == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_reg64 rRdx va_s) ((count))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in let va_g = (count) in let (count:nat) = va_g in va_QEmpty ((count))))) val va_lemma_Loop_while0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_while0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig))) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_while0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_while0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_while0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~(va_get_reg64 rRdx va_sM > 0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_while0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_while0 (va_code_Loop_while0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_while0 ())) = (va_QProc (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop val va_code_Loop : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop () = (va_Block (va_CCons (va_code_Loop_while0 ()) (va_CNil ()))) val va_codegen_success_Loop : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop () = (va_pbool_and (va_codegen_success_Loop_while0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (count:nat) = 0 in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 556 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_while0 va_old_s hash_orig in_b k_b count) (fun (va_s:va_state) count -> va_QEmpty (())))) val va_lemma_Loop : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))))
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_lemma_Loop : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))))
[]
Vale.SHA.X64.va_lemma_Loop
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_b0: Vale.X64.Decls.va_code -> va_s0: Vale.X64.Decls.va_state -> in_b: Vale.X64.Memory.buffer128 -> k_b: Vale.X64.Memory.buffer128 -> Prims.Ghost (Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel)
{ "end_col": 16, "end_line": 1970, "start_col": 40, "start_line": 1946 }
Prims.Ghost
val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM)
val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig =
false
null
false
va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let va_old_s:va_state = va_s0 in let va_b1:va_codes = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let va_fc11, va_s11 = (if (i > 4) then (let va_b12 = va_get_block va_c11 in let va_s13, va_fc13 = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let va_s11, va_f13 = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11)) else (let va_b14 = va_get_block va_c11 in let va_s11, va_fc11 = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11))) in let va_s15, va_fc15 = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let va_s16, va_fc16 = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let va_sM, va_f16 = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM)
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "" ]
[ "Vale.X64.Decls.va_code", "Vale.X64.Decls.va_state", "Prims.nat", "Vale.X64.Memory.buffer128", "Vale.SHA.SHA_helpers.block_w", "Vale.SHA.SHA_helpers.hash256", "Vale.X64.Decls.va_fuel", "FStar.Pervasives.Native.Mktuple2", "Vale.X64.Decls.va_lemma_merge_total", "FStar.Pervasives.Native.tuple2", "Vale.X64.State.vale_state", "Vale.X64.Decls.va_lemma_empty_total", "Prims.list", "Vale.X64.Machine_s.precode", "Vale.X64.Decls.ins", "Vale.X64.Decls.ocmp", "Vale.X64.Decls.va_tl", "Vale.SHA.X64.va_lemma_Msg_shift", "Vale.X64.Decls.va_hd", "Vale.SHA.X64.va_lemma_Loop_rounds_16_51_body", "Prims.op_GreaterThan", "Vale.SHA.X64.va_lemma_Loop_rounds_16_51_recursive", "Prims.op_Subtraction", "Vale.X64.Decls.va_get_block", "Prims.bool", "Prims.unit", "Vale.X64.Decls.va_reveal_opaque", "Vale.SHA.X64.va_code_Loop_rounds_16_51_recursive" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"]
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))))
[ "recursion" ]
Vale.SHA.X64.va_lemma_Loop_rounds_16_51_recursive
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_b0: Vale.X64.Decls.va_code -> va_s0: Vale.X64.Decls.va_state -> i: Prims.nat -> k_b: Vale.X64.Memory.buffer128 -> block: Vale.SHA.SHA_helpers.block_w -> hash_orig: Vale.SHA.SHA_helpers.hash256 -> Prims.Ghost (Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel)
{ "end_col": 16, "end_line": 951, "start_col": 2, "start_line": 918 }
Prims.Tot
val va_qcode_Sha_update_bytes (va_mods: va_mods_t) (ctx_b in_b k_b: buffer128) : (va_quickCode unit (va_code_Sha_update_bytes ()))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_qcode_Sha_update_bytes (va_mods:va_mods_t) (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update_bytes ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 714 column 15 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sha_update ctx_b in_b k_b) (fun (va_s:va_state) _ -> let (old_ctx:(seq (four nat32))) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_old_s) ctx_b in let (new_ctx:(seq (four nat32))) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) ctx_b in let (va_arg34:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = old_ctx in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 717 column 24 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_hash_to_bytes va_arg34) (let (va_arg33:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = new_ctx in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 718 column 24 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_hash_to_bytes va_arg33) (let (hash_in:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes old_ctx) in let (hash_out:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes new_ctx) in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 728 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_old_s)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_old_s) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 730 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (hash_out == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_in) (let (va_arg32:(FStar.Seq.Base.seq Vale.SHA.SHA_helpers.byte)) = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes input_LE) in let (va_arg31:(FStar.Seq.Base.seq Vale.Def.Words_s.nat8)) = Vale.Def.Types_s.le_seq_quad32_to_bytes input_LE in let (va_arg30:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = input_LE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 731 column 34 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_equiv_vale hash_in hash_out va_arg30 input_BE va_arg31 va_arg32) (va_QEmpty (())))))))))
val va_qcode_Sha_update_bytes (va_mods: va_mods_t) (ctx_b in_b k_b: buffer128) : (va_quickCode unit (va_code_Sha_update_bytes ())) let va_qcode_Sha_update_bytes (va_mods: va_mods_t) (ctx_b in_b k_b: buffer128) : (va_quickCode unit (va_code_Sha_update_bytes ())) =
false
null
false
(qblock va_mods (fun (va_s: va_state) -> let va_old_s:va_state = va_s in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 714 column 15 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sha_update ctx_b in_b k_b) (fun (va_s: va_state) _ -> let old_ctx:(seq (four nat32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_old_s) ctx_b in let new_ctx:(seq (four nat32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) ctx_b in let va_arg34:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32) = old_ctx in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 717 column 24 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_: unit) -> Vale.SHA.SHA_helpers.lemma_hash_to_bytes va_arg34) (let va_arg33:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32) = new_ctx in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 718 column 24 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_: unit) -> Vale.SHA.SHA_helpers.lemma_hash_to_bytes va_arg33) (let hash_in:Vale.SHA.SHA_helpers.hash256 = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes old_ctx) in let hash_out:Vale.SHA.SHA_helpers.hash256 = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes new_ctx) in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 728 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583: (FStar.Seq.Base.seq a_1582)) (i_1584: Prims.nat) (j_1585: Prims.nat) -> let j_1545:Prims.nat = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (4 `op_Multiply` (va_get_reg64 rRdx va_old_s))) (fun _ -> let input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (4 `op_Multiply` (va_get_reg64 rRdx va_old_s)) in let input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 730 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (hash_out == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_in) (let va_arg32:(FStar.Seq.Base.seq Vale.SHA.SHA_helpers.byte) = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes input_LE) in let va_arg31:(FStar.Seq.Base.seq Vale.Def.Words_s.nat8) = Vale.Def.Types_s.le_seq_quad32_to_bytes input_LE in let va_arg30:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32) = input_LE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 731 column 34 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_: unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_equiv_vale hash_in hash_out va_arg30 input_BE va_arg31 va_arg32) (va_QEmpty (())))))))))
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[ "total" ]
[ "Vale.X64.QuickCode.va_mods_t", "Vale.X64.Memory.buffer128", "Vale.X64.QuickCodes.qblock", "Prims.unit", "Prims.Cons", "Vale.X64.Decls.va_code", "Vale.SHA.X64.va_code_Sha_update", "Vale.X64.Machine_s.Block", "Vale.X64.Decls.ins", "Vale.X64.Decls.ocmp", "Prims.Nil", "Vale.X64.Machine_s.precode", "Vale.X64.Decls.va_state", "Vale.X64.QuickCodes.va_QBind", "Vale.X64.QuickCodes.va_range1", "Vale.SHA.X64.va_quick_Sha_update", "Vale.X64.QuickCodes.va_qPURE", "Prims.pure_post", "Prims.l_and", "Prims.eq2", "Prims.int", "FStar.Seq.Base.length", "Vale.Def.Types_s.quad32", "Prims.l_Forall", "Prims.l_imp", "Vale.SHA.SHA_helpers.hash256", "Vale.SHA.SHA_helpers.make_ordered_hash", "FStar.Seq.Base.index", "Vale.SHA.SHA_helpers.le_bytes_to_hash", "Vale.Def.Types_s.le_seq_quad32_to_bytes", "Vale.SHA.SHA_helpers.lemma_hash_to_bytes", "Vale.X64.QuickCodes.va_qAssertSquash", "Prims.b2t", "Prims.op_AmpAmp", "Prims.op_LessThanOrEqual", "Vale.X64.Decls.quad32", "Vale.X64.Decls.buffer128_as_seq", "Vale.X64.Decls.va_get_mem_heaplet", "Prims.nat", "Prims.op_Multiply", "Vale.X64.Decls.va_get_reg64", "Vale.X64.Machine_s.rRdx", "Prims.squash", "Vale.X64.QuickCodes.va_qAssert", "Vale.SHA.SHA_helpers.update_multi_quads", "Prims.op_Modulus", "FStar.Seq.Base.seq", "Vale.Arch.Types.reverse_bytes_nat32_quad32_seq", "Vale.Def.Words_s.nat8", "FStar.UInt8.t", "Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8", "Vale.SHA.SHA_helpers.byte", "Vale.SHA.SHA_helpers.update_multi_opaque_vale", "Vale.SHA.SHA_helpers.lemma_update_multi_equiv_vale", "Vale.X64.QuickCodes.va_QEmpty", "FStar.Seq.Base.slice", "Vale.X64.QuickCodes.quickCodes", "Vale.Def.Words_s.four", "Vale.Def.Words_s.nat32", "Vale.X64.State.vale_state", "Vale.X64.QuickCode.va_quickCode", "Vale.SHA.X64.va_code_Sha_update_bytes" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ()))) val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_body0 () = (va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_body0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 578 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds in_b k_b (count `op_Multiply` 4) hash_orig) (fun (va_s:va_state) _ -> let (count:nat) = count + 1 in va_QEmpty ((count))))) val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_body0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_body0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_body0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 576 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0 /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_body0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_body0 (va_code_Loop_body0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_body0 ())) = (va_QProc (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop_while0 val va_code_Loop_while0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_while0 () = (va_Block (va_CCons (va_While (va_cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (va_Block (va_CCons (va_code_Loop_body0 ()) (va_CNil ())))) (va_CNil ()))) val va_codegen_success_Loop_while0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_while0 () = (va_pbool_and (va_codegen_success_Loop_body0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_while0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_while0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qWhile va_mods (Cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (fun va_g -> let (count:nat) = let count = va_g in count in qblock va_mods (fun (va_s:va_state) -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_body0 va_old hash_orig in_b k_b count) (fun (va_s:va_state) (count:nat) -> va_QEmpty ((count))))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_ok va_s /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRsi va_old) in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRcx va_s) k_b 16 (va_get_mem_layout va_s) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_s == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_reg64 rRdx va_s) ((count))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in let va_g = (count) in let (count:nat) = va_g in va_QEmpty ((count))))) val va_lemma_Loop_while0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_while0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig))) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_while0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_while0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_while0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~(va_get_reg64 rRdx va_sM > 0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_while0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_while0 (va_code_Loop_while0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_while0 ())) = (va_QProc (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop val va_code_Loop : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop () = (va_Block (va_CCons (va_code_Loop_while0 ()) (va_CNil ()))) val va_codegen_success_Loop : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop () = (va_pbool_and (va_codegen_success_Loop_while0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (count:nat) = 0 in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 556 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_while0 va_old_s hash_orig in_b k_b count) (fun (va_s:va_state) count -> va_QEmpty (())))) val va_lemma_Loop : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop va_b0 va_s0 in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop va_mods in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 547 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 548 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == 0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 551 column 90 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) ==> va_k va_sM (()))) val va_wpProof_Loop : in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop (va_code_Loop ()) va_s0 in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (va_QProc (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop in_b k_b) (va_wpProof_Loop in_b k_b)) //-- //-- Epilogue val va_code_Epilogue : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Epilogue () = (va_Block (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_CNil ()))))))))) val va_codegen_success_Epilogue : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Epilogue () = (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_ttrue ())))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Epilogue (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Epilogue ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 612 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 613 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 614 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 616 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 617 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 619 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret ctx_b 0) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 620 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret ctx_b 1) (fun (va_s:va_state) _ -> let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 623 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_old_s) (va_get_xmm 2 va_old_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))) val va_lemma_Epilogue : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Epilogue ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Epilogue va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Epilogue va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Epilogue ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 583 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 603 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 606 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Epilogue (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_mem:vale_heap) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_heap0:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_mem va_x_mem va_s0))))) in va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) ==> va_k va_sM (()))) val va_wpProof_Epilogue : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Epilogue ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Epilogue ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Epilogue ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Epilogue (va_code_Epilogue ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Epilogue (ctx_b:buffer128) : (va_quickCode unit (va_code_Epilogue ())) = (va_QProc (va_code_Epilogue ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) (va_wp_Epilogue ctx_b) (va_wpProof_Epilogue ctx_b)) //-- //-- Sha_update val va_code_Sha_update : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Sha_update () = (va_Block (va_CCons (va_code_Preamble ()) (va_CCons (va_code_Loop ()) (va_CCons (va_code_Epilogue ()) (va_CNil ()))))) val va_codegen_success_Sha_update : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Sha_update () = (va_pbool_and (va_codegen_success_Preamble ()) (va_pbool_and (va_codegen_success_Loop ()) (va_pbool_and (va_codegen_success_Epilogue ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Sha_update (va_mods:va_mods_t) (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 667 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Preamble ctx_b) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 668 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop in_b k_b) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 669 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Epilogue ctx_b) (va_QEmpty (())))))) val va_lemma_Sha_update : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Sha_update ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))))))))))))))) [@"opaque_to_smt"] let va_lemma_Sha_update va_b0 va_s0 ctx_b in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Sha_update va_mods ctx_b in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Sha_update ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 627 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 653 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 662 column 103 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 665 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Sha_update (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_mem:vale_heap) (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_heap0:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi (va_upd_mem va_x_mem va_s0)))))))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) ==> va_k va_sM (()))) val va_wpProof_Sha_update : ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Sha_update ctx_b in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Sha_update ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Sha_update ctx_b in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Sha_update (va_code_Sha_update ()) va_s0 ctx_b in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Sha_update (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update ())) = (va_QProc (va_code_Sha_update ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) (va_wp_Sha_update ctx_b in_b k_b) (va_wpProof_Sha_update ctx_b in_b k_b)) //-- //-- Sha_update_bytes #push-options "--z3rlimit 80" #restart-solver val va_code_Sha_update_bytes : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Sha_update_bytes () = (va_Block (va_CCons (va_code_Sha_update ()) (va_CCons (va_Block (va_CNil ())) (va_CNil ())))) val va_codegen_success_Sha_update_bytes : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Sha_update_bytes () = (va_pbool_and (va_codegen_success_Sha_update ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Sha_update_bytes (va_mods:va_mods_t) (ctx_b:buffer128) (in_b:buffer128)
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 80, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_qcode_Sha_update_bytes (va_mods: va_mods_t) (ctx_b in_b k_b: buffer128) : (va_quickCode unit (va_code_Sha_update_bytes ()))
[]
Vale.SHA.X64.va_qcode_Sha_update_bytes
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_mods: Vale.X64.QuickCode.va_mods_t -> ctx_b: Vale.X64.Memory.buffer128 -> in_b: Vale.X64.Memory.buffer128 -> k_b: Vale.X64.Memory.buffer128 -> Vale.X64.QuickCode.va_quickCode Prims.unit (Vale.SHA.X64.va_code_Sha_update_bytes ())
{ "end_col": 55, "end_line": 2377, "start_col": 2, "start_line": 2343 }
Prims.Ghost
val va_lemma_Sha_update : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Sha_update ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))))))))))))))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_lemma_Sha_update va_b0 va_s0 ctx_b in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Sha_update va_mods ctx_b in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Sha_update ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 627 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 653 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 662 column 103 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 665 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM)
val va_lemma_Sha_update : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Sha_update ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))))))))))))))) let va_lemma_Sha_update va_b0 va_s0 ctx_b in_b k_b =
false
null
false
let va_mods:va_mods_t = [ va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem ] in let va_qc = va_qcode_Sha_update va_mods ctx_b in_b k_b in let va_sM, va_fM, va_g = va_wp_sound_code_norm (va_code_Sha_update ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 627 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 653 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` (va_get_reg64 rRdx va_s0)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 662 column 103 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` (va_get_reg64 rRdx va_s0)) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 665 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([ va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem ]) va_sM va_s0; (va_sM, va_fM)
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[]
[ "Vale.X64.Decls.va_code", "Vale.X64.Decls.va_state", "Vale.X64.Memory.buffer128", "Vale.X64.QuickCodes.fuel", "Prims.unit", "FStar.Pervasives.Native.Mktuple2", "Vale.X64.Decls.va_fuel", "Vale.X64.QuickCode.va_lemma_norm_mods", "Prims.Cons", "Vale.X64.QuickCode.mod_t", "Vale.X64.QuickCode.va_Mod_flags", "Vale.X64.QuickCode.va_Mod_mem_heaplet", "Vale.X64.QuickCode.va_Mod_xmm", "Vale.X64.QuickCode.va_Mod_reg64", "Vale.X64.Machine_s.rRax", "Vale.X64.Machine_s.rRdx", "Vale.X64.Machine_s.rRsi", "Vale.X64.QuickCode.va_Mod_ok", "Vale.X64.QuickCode.va_Mod_mem", "Prims.Nil", "FStar.Pervasives.assert_norm", "Prims.eq2", "Prims.list", "Vale.X64.QuickCode.__proj__QProc__item__mods", "Vale.SHA.X64.va_code_Sha_update", "FStar.Pervasives.Native.tuple2", "FStar.Pervasives.Native.tuple3", "Vale.X64.State.vale_state", "Vale.X64.QuickCodes.va_wp_sound_code_norm", "Prims.l_and", "Vale.X64.QuickCodes.label", "Vale.X64.QuickCodes.va_range1", "Prims.b2t", "Vale.X64.Decls.va_get_ok", "Prims.int", "Vale.X64.Decls.va_get_reg64", "Prims.op_Addition", "Prims.op_Multiply", "Vale.SHA.SHA_helpers.hash256", "Vale.SHA.SHA_helpers.make_ordered_hash", "Vale.SHA.SHA_helpers.update_multi_quads", "FStar.Seq.Base.seq", "Vale.Def.Types_s.quad32", "Vale.Arch.Types.reverse_bytes_nat32_quad32_seq", "FStar.Seq.Base.slice", "Vale.X64.Decls.quad32", "Vale.X64.Decls.buffer128_as_seq", "Vale.X64.Decls.va_get_mem_heaplet", "Vale.X64.Decls.buffer128_read", "Vale.X64.Decls.modifies_buffer128", "Vale.X64.QuickCode.quickCode", "Vale.SHA.X64.va_qcode_Sha_update" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ()))) val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_body0 () = (va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_body0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 578 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds in_b k_b (count `op_Multiply` 4) hash_orig) (fun (va_s:va_state) _ -> let (count:nat) = count + 1 in va_QEmpty ((count))))) val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_body0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_body0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_body0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 576 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0 /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_body0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_body0 (va_code_Loop_body0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_body0 ())) = (va_QProc (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop_while0 val va_code_Loop_while0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_while0 () = (va_Block (va_CCons (va_While (va_cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (va_Block (va_CCons (va_code_Loop_body0 ()) (va_CNil ())))) (va_CNil ()))) val va_codegen_success_Loop_while0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_while0 () = (va_pbool_and (va_codegen_success_Loop_body0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_while0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_while0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qWhile va_mods (Cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (fun va_g -> let (count:nat) = let count = va_g in count in qblock va_mods (fun (va_s:va_state) -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_body0 va_old hash_orig in_b k_b count) (fun (va_s:va_state) (count:nat) -> va_QEmpty ((count))))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_ok va_s /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRsi va_old) in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRcx va_s) k_b 16 (va_get_mem_layout va_s) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_s == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_reg64 rRdx va_s) ((count))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in let va_g = (count) in let (count:nat) = va_g in va_QEmpty ((count))))) val va_lemma_Loop_while0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_while0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig))) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_while0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_while0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_while0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~(va_get_reg64 rRdx va_sM > 0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_while0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_while0 (va_code_Loop_while0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_while0 ())) = (va_QProc (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop val va_code_Loop : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop () = (va_Block (va_CCons (va_code_Loop_while0 ()) (va_CNil ()))) val va_codegen_success_Loop : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop () = (va_pbool_and (va_codegen_success_Loop_while0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (count:nat) = 0 in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 556 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_while0 va_old_s hash_orig in_b k_b count) (fun (va_s:va_state) count -> va_QEmpty (())))) val va_lemma_Loop : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop va_b0 va_s0 in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop va_mods in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 547 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 548 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == 0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 551 column 90 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) ==> va_k va_sM (()))) val va_wpProof_Loop : in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop (va_code_Loop ()) va_s0 in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (va_QProc (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop in_b k_b) (va_wpProof_Loop in_b k_b)) //-- //-- Epilogue val va_code_Epilogue : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Epilogue () = (va_Block (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_CNil ()))))))))) val va_codegen_success_Epilogue : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Epilogue () = (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_ttrue ())))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Epilogue (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Epilogue ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 612 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 613 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 614 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 616 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 617 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 619 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret ctx_b 0) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 620 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret ctx_b 1) (fun (va_s:va_state) _ -> let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 623 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_old_s) (va_get_xmm 2 va_old_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))) val va_lemma_Epilogue : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Epilogue ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Epilogue va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Epilogue va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Epilogue ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 583 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 603 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 606 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Epilogue (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_mem:vale_heap) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_heap0:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_mem va_x_mem va_s0))))) in va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) ==> va_k va_sM (()))) val va_wpProof_Epilogue : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Epilogue ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Epilogue ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Epilogue ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Epilogue (va_code_Epilogue ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Epilogue (ctx_b:buffer128) : (va_quickCode unit (va_code_Epilogue ())) = (va_QProc (va_code_Epilogue ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) (va_wp_Epilogue ctx_b) (va_wpProof_Epilogue ctx_b)) //-- //-- Sha_update val va_code_Sha_update : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Sha_update () = (va_Block (va_CCons (va_code_Preamble ()) (va_CCons (va_code_Loop ()) (va_CCons (va_code_Epilogue ()) (va_CNil ()))))) val va_codegen_success_Sha_update : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Sha_update () = (va_pbool_and (va_codegen_success_Preamble ()) (va_pbool_and (va_codegen_success_Loop ()) (va_pbool_and (va_codegen_success_Epilogue ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Sha_update (va_mods:va_mods_t) (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 667 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Preamble ctx_b) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 668 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop in_b k_b) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 669 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Epilogue ctx_b) (va_QEmpty (())))))) val va_lemma_Sha_update : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Sha_update ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))))))))))))))
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_lemma_Sha_update : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Sha_update ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))))))))))))))
[]
Vale.SHA.X64.va_lemma_Sha_update
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_b0: Vale.X64.Decls.va_code -> va_s0: Vale.X64.Decls.va_state -> ctx_b: Vale.X64.Memory.buffer128 -> in_b: Vale.X64.Memory.buffer128 -> k_b: Vale.X64.Memory.buffer128 -> Prims.Ghost (Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel)
{ "end_col": 16, "end_line": 2256, "start_col": 52, "start_line": 2225 }
Prims.Ghost
val va_wpProof_Sha_update_bytes : ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Sha_update_bytes ctx_b in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Sha_update_bytes ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g))))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_wpProof_Sha_update_bytes ctx_b in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Sha_update_bytes (va_code_Sha_update_bytes ()) va_s0 ctx_b in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
val va_wpProof_Sha_update_bytes : ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Sha_update_bytes ctx_b in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Sha_update_bytes ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g)))) let va_wpProof_Sha_update_bytes ctx_b in_b k_b va_s0 va_k =
false
null
false
let va_sM, va_f0 = va_lemma_Sha_update_bytes (va_code_Sha_update_bytes ()) va_s0 ctx_b in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0 ))))))))))))))))))); va_lemma_norm_mods ([ va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem ]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g)
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[]
[ "Vale.X64.Memory.buffer128", "Vale.X64.Decls.va_state", "Prims.unit", "Vale.X64.Decls.va_fuel", "FStar.Pervasives.Native.Mktuple3", "Vale.X64.QuickCode.va_lemma_norm_mods", "Prims.Cons", "Vale.X64.QuickCode.mod_t", "Vale.X64.QuickCode.va_Mod_flags", "Vale.X64.QuickCode.va_Mod_mem_heaplet", "Vale.X64.QuickCode.va_Mod_xmm", "Vale.X64.QuickCode.va_Mod_reg64", "Vale.X64.Machine_s.rRax", "Vale.X64.Machine_s.rRdx", "Vale.X64.Machine_s.rRsi", "Vale.X64.QuickCode.va_Mod_mem", "Prims.Nil", "Prims._assert", "Vale.X64.Decls.va_state_eq", "Vale.X64.Decls.va_update_flags", "Vale.X64.Decls.va_update_mem_heaplet", "Vale.X64.Decls.va_update_xmm", "Vale.X64.Decls.va_update_reg64", "Vale.X64.Decls.va_update_ok", "Vale.X64.Decls.va_update_mem", "Vale.X64.Decls.va_lemma_upd_update", "FStar.Pervasives.Native.tuple3", "FStar.Pervasives.Native.tuple2", "Vale.X64.State.vale_state", "Vale.SHA.X64.va_lemma_Sha_update_bytes", "Vale.SHA.X64.va_code_Sha_update_bytes" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ()))) val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_body0 () = (va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_body0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 578 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds in_b k_b (count `op_Multiply` 4) hash_orig) (fun (va_s:va_state) _ -> let (count:nat) = count + 1 in va_QEmpty ((count))))) val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_body0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_body0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_body0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 576 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0 /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_body0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_body0 (va_code_Loop_body0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_body0 ())) = (va_QProc (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop_while0 val va_code_Loop_while0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_while0 () = (va_Block (va_CCons (va_While (va_cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (va_Block (va_CCons (va_code_Loop_body0 ()) (va_CNil ())))) (va_CNil ()))) val va_codegen_success_Loop_while0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_while0 () = (va_pbool_and (va_codegen_success_Loop_body0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_while0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_while0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qWhile va_mods (Cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (fun va_g -> let (count:nat) = let count = va_g in count in qblock va_mods (fun (va_s:va_state) -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_body0 va_old hash_orig in_b k_b count) (fun (va_s:va_state) (count:nat) -> va_QEmpty ((count))))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_ok va_s /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRsi va_old) in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRcx va_s) k_b 16 (va_get_mem_layout va_s) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_s == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_reg64 rRdx va_s) ((count))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in let va_g = (count) in let (count:nat) = va_g in va_QEmpty ((count))))) val va_lemma_Loop_while0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_while0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig))) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_while0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_while0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_while0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~(va_get_reg64 rRdx va_sM > 0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_while0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_while0 (va_code_Loop_while0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_while0 ())) = (va_QProc (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop val va_code_Loop : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop () = (va_Block (va_CCons (va_code_Loop_while0 ()) (va_CNil ()))) val va_codegen_success_Loop : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop () = (va_pbool_and (va_codegen_success_Loop_while0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (count:nat) = 0 in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 556 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_while0 va_old_s hash_orig in_b k_b count) (fun (va_s:va_state) count -> va_QEmpty (())))) val va_lemma_Loop : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop va_b0 va_s0 in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop va_mods in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 547 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 548 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == 0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 551 column 90 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) ==> va_k va_sM (()))) val va_wpProof_Loop : in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop (va_code_Loop ()) va_s0 in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (va_QProc (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop in_b k_b) (va_wpProof_Loop in_b k_b)) //-- //-- Epilogue val va_code_Epilogue : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Epilogue () = (va_Block (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_CNil ()))))))))) val va_codegen_success_Epilogue : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Epilogue () = (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_ttrue ())))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Epilogue (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Epilogue ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 612 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 613 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 614 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 616 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 617 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 619 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret ctx_b 0) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 620 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret ctx_b 1) (fun (va_s:va_state) _ -> let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 623 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_old_s) (va_get_xmm 2 va_old_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))) val va_lemma_Epilogue : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Epilogue ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Epilogue va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Epilogue va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Epilogue ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 583 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 603 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 606 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Epilogue (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_mem:vale_heap) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_heap0:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_mem va_x_mem va_s0))))) in va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) ==> va_k va_sM (()))) val va_wpProof_Epilogue : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Epilogue ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Epilogue ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Epilogue ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Epilogue (va_code_Epilogue ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Epilogue (ctx_b:buffer128) : (va_quickCode unit (va_code_Epilogue ())) = (va_QProc (va_code_Epilogue ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) (va_wp_Epilogue ctx_b) (va_wpProof_Epilogue ctx_b)) //-- //-- Sha_update val va_code_Sha_update : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Sha_update () = (va_Block (va_CCons (va_code_Preamble ()) (va_CCons (va_code_Loop ()) (va_CCons (va_code_Epilogue ()) (va_CNil ()))))) val va_codegen_success_Sha_update : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Sha_update () = (va_pbool_and (va_codegen_success_Preamble ()) (va_pbool_and (va_codegen_success_Loop ()) (va_pbool_and (va_codegen_success_Epilogue ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Sha_update (va_mods:va_mods_t) (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 667 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Preamble ctx_b) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 668 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop in_b k_b) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 669 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Epilogue ctx_b) (va_QEmpty (())))))) val va_lemma_Sha_update : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Sha_update ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))))))))))))))) [@"opaque_to_smt"] let va_lemma_Sha_update va_b0 va_s0 ctx_b in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Sha_update va_mods ctx_b in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Sha_update ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 627 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 653 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 662 column 103 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 665 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Sha_update (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_mem:vale_heap) (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_heap0:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi (va_upd_mem va_x_mem va_s0)))))))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) ==> va_k va_sM (()))) val va_wpProof_Sha_update : ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Sha_update ctx_b in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Sha_update ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Sha_update ctx_b in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Sha_update (va_code_Sha_update ()) va_s0 ctx_b in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Sha_update (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update ())) = (va_QProc (va_code_Sha_update ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) (va_wp_Sha_update ctx_b in_b k_b) (va_wpProof_Sha_update ctx_b in_b k_b)) //-- //-- Sha_update_bytes #push-options "--z3rlimit 80" #restart-solver val va_code_Sha_update_bytes : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Sha_update_bytes () = (va_Block (va_CCons (va_code_Sha_update ()) (va_CCons (va_Block (va_CNil ())) (va_CNil ())))) val va_codegen_success_Sha_update_bytes : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Sha_update_bytes () = (va_pbool_and (va_codegen_success_Sha_update ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Sha_update_bytes (va_mods:va_mods_t) (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update_bytes ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 714 column 15 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sha_update ctx_b in_b k_b) (fun (va_s:va_state) _ -> let (old_ctx:(seq (four nat32))) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_old_s) ctx_b in let (new_ctx:(seq (four nat32))) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) ctx_b in let (va_arg34:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = old_ctx in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 717 column 24 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_hash_to_bytes va_arg34) (let (va_arg33:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = new_ctx in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 718 column 24 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_hash_to_bytes va_arg33) (let (hash_in:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes old_ctx) in let (hash_out:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes new_ctx) in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 728 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_old_s)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_old_s) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 730 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (hash_out == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_in) (let (va_arg32:(FStar.Seq.Base.seq Vale.SHA.SHA_helpers.byte)) = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes input_LE) in let (va_arg31:(FStar.Seq.Base.seq Vale.Def.Words_s.nat8)) = Vale.Def.Types_s.le_seq_quad32_to_bytes input_LE in let (va_arg30:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = input_LE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 731 column 34 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_equiv_vale hash_in hash_out va_arg30 input_BE va_arg31 va_arg32) (va_QEmpty (()))))))))) val va_lemma_Sha_update_bytes : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Sha_update_bytes ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 ctx_b == 2 /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 in_b == 4 `op_Multiply` va_get_reg64 rRdx va_s0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let hash_in = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) ctx_b)) in let hash_out = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) ctx_b)) in (let input_LE = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b)) in l_and (FStar.Seq.Base.length #FStar.UInt8.t input_LE `op_Modulus` 64 == 0) (hash_out == Vale.SHA.SHA_helpers.update_multi_opaque_vale hash_in input_LE)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))))))))))))))) [@"opaque_to_smt"] let va_lemma_Sha_update_bytes va_b0 va_s0 ctx_b in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Sha_update_bytes va_mods ctx_b in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Sha_update_bytes ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 672 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 702 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 704 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_in = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) ctx_b)) in label va_range1 "***** POSTCONDITION NOT MET AT line 705 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_out = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) ctx_b)) in label va_range1 "***** POSTCONDITION NOT MET AT line 709 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b)) in l_and (FStar.Seq.Base.length #FStar.UInt8.t input_LE `op_Modulus` 64 == 0) (hash_out == Vale.SHA.SHA_helpers.update_multi_opaque_vale hash_in input_LE)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 712 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Sha_update_bytes (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 ctx_b == 2 /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 in_b == 4 `op_Multiply` va_get_reg64 rRdx va_s0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_mem:vale_heap) (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_heap0:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi (va_upd_mem va_x_mem va_s0)))))))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let hash_in = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) ctx_b)) in let hash_out = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) ctx_b)) in (let input_LE = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b)) in l_and (FStar.Seq.Base.length #FStar.UInt8.t input_LE `op_Modulus` 64 == 0) (hash_out == Vale.SHA.SHA_helpers.update_multi_opaque_vale hash_in input_LE)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM))) ==> va_k va_sM (()))) val va_wpProof_Sha_update_bytes : ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Sha_update_bytes ctx_b in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Sha_update_bytes ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g))))
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 80, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_wpProof_Sha_update_bytes : ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Sha_update_bytes ctx_b in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Sha_update_bytes ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g))))
[]
Vale.SHA.X64.va_wpProof_Sha_update_bytes
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
ctx_b: Vale.X64.Memory.buffer128 -> in_b: Vale.X64.Memory.buffer128 -> k_b: Vale.X64.Memory.buffer128 -> va_s0: Vale.X64.Decls.va_state -> va_k: (_: Vale.X64.Decls.va_state -> _: Prims.unit -> Type0) -> Prims.Ghost ((Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel) * Prims.unit)
{ "end_col": 22, "end_line": 2507, "start_col": 59, "start_line": 2492 }
Prims.Ghost
val va_lemma_Loop_while0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_while0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig))) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_lemma_Loop_while0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_while0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_while0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~(va_get_reg64 rRdx va_sM > 0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count)
val va_lemma_Loop_while0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_while0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig))) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) let va_lemma_Loop_while0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count =
false
null
false
let va_old = va_expand_state va_old in let va_mods:va_mods_t = [ va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags ] in let va_qc = va_qcode_Loop_while0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let va_sM, va_fM, va_g = va_wp_sound_code_norm (va_code_Loop_while0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` (va_get_reg64 rRdx va_old)) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` (va_get_reg64 rRdx va_old) < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~(va_get_reg64 rRdx va_sM > 0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([ va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags ]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count)
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[]
[ "Vale.X64.Decls.va_code", "Vale.X64.Decls.va_state", "Vale.SHA.SHA_helpers.hash256", "Vale.X64.Memory.buffer128", "Prims.nat", "Vale.X64.QuickCodes.fuel", "FStar.Pervasives.Native.Mktuple3", "Vale.X64.Decls.va_fuel", "Prims.unit", "Vale.X64.QuickCode.va_lemma_norm_mods", "Prims.Cons", "Vale.X64.QuickCode.mod_t", "Vale.X64.QuickCode.va_Mod_xmm", "Vale.X64.QuickCode.va_Mod_reg64", "Vale.X64.Machine_s.rRsi", "Vale.X64.Machine_s.rRdx", "Vale.X64.QuickCode.va_Mod_ok", "Vale.X64.QuickCode.va_Mod_flags", "Prims.Nil", "FStar.Pervasives.assert_norm", "Prims.eq2", "Prims.list", "Vale.X64.QuickCode.__proj__QProc__item__mods", "Vale.SHA.X64.va_code_Loop_while0", "FStar.Pervasives.Native.tuple3", "Vale.X64.State.vale_state", "Vale.X64.QuickCodes.va_wp_sound_code_norm", "Prims.l_and", "Vale.X64.QuickCodes.label", "Vale.X64.QuickCodes.va_range1", "Prims.b2t", "Vale.X64.Decls.va_get_ok", "Vale.X64.CPU_Features_s.sha_enabled", "Vale.X64.CPU_Features_s.sse_enabled", "Vale.X64.Decls.validSrcAddrs128", "Vale.X64.Decls.va_get_mem_heaplet", "Vale.X64.Decls.va_get_reg64", "Prims.op_Multiply", "Vale.X64.Decls.va_get_mem_layout", "Vale.Arch.HeapTypes_s.Secret", "Vale.X64.Machine_s.rRcx", "Prims.op_LessThan", "Prims.op_Addition", "Vale.X64.Machine_s.pow2_64", "Prims.int", "Prims.op_Subtraction", "Vale.Def.Words_s.four", "Vale.Def.Types_s.nat32", "Vale.X64.Decls.va_get_xmm", "Vale.Def.Words_s.Mkfour", "Vale.SHA.SHA_helpers.k_reqs", "Vale.X64.Decls.buffer128_as_seq", "Vale.SHA.SHA_helpers.make_hash", "Vale.SHA.SHA_helpers.update_multi_quads", "FStar.Seq.Base.seq", "Vale.Def.Types_s.quad32", "Vale.Arch.Types.reverse_bytes_nat32_quad32_seq", "FStar.Seq.Base.slice", "Vale.X64.Decls.quad32", "Prims.l_not", "Prims.op_GreaterThan", "Vale.X64.QuickCode.quickCode", "Vale.SHA.X64.va_qcode_Loop_while0", "Vale.X64.Decls.va_expand_state" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ()))) val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_body0 () = (va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_body0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 578 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds in_b k_b (count `op_Multiply` 4) hash_orig) (fun (va_s:va_state) _ -> let (count:nat) = count + 1 in va_QEmpty ((count))))) val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_body0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_body0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_body0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 576 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0 /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_body0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_body0 (va_code_Loop_body0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_body0 ())) = (va_QProc (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop_while0 val va_code_Loop_while0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_while0 () = (va_Block (va_CCons (va_While (va_cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (va_Block (va_CCons (va_code_Loop_body0 ()) (va_CNil ())))) (va_CNil ()))) val va_codegen_success_Loop_while0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_while0 () = (va_pbool_and (va_codegen_success_Loop_body0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_while0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_while0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qWhile va_mods (Cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (fun va_g -> let (count:nat) = let count = va_g in count in qblock va_mods (fun (va_s:va_state) -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_body0 va_old hash_orig in_b k_b count) (fun (va_s:va_state) (count:nat) -> va_QEmpty ((count))))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_ok va_s /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRsi va_old) in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRcx va_s) k_b 16 (va_get_mem_layout va_s) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_s == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_reg64 rRdx va_s) ((count))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in let va_g = (count) in let (count:nat) = va_g in va_QEmpty ((count))))) val va_lemma_Loop_while0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_while0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig))) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))))
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 40, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_lemma_Loop_while0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_while0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig))) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))))
[]
Vale.SHA.X64.va_lemma_Loop_while0
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_b0: Vale.X64.Decls.va_code -> va_s0: Vale.X64.Decls.va_state -> va_old: Vale.X64.Decls.va_state -> va_in_hash_orig: Vale.SHA.SHA_helpers.hash256 -> va_in_in_b: Vale.X64.Memory.buffer128 -> va_in_k_b: Vale.X64.Memory.buffer128 -> va_in_count: Prims.nat -> Prims.Ghost ((Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel) * Prims.nat)
{ "end_col": 23, "end_line": 1819, "start_col": 94, "start_line": 1769 }
Prims.Ghost
val va_lemma_Sha_update_bytes_stdcall : va_b0:va_code -> va_s0:va_state -> win:bool -> ctx_b:buffer128 -> in_b:buffer128 -> num_val:nat64 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Sha_update_bytes_stdcall win) va_s0 /\ va_get_ok va_s0 /\ (let (ctx_ptr:(va_int_range 0 18446744073709551615)) = (if win then va_get_reg64 rRcx va_s0 else va_get_reg64 rRdi va_s0) in let (in_ptr:(va_int_range 0 18446744073709551615)) = (if win then va_get_reg64 rRdx va_s0 else va_get_reg64 rRsi va_s0) in let (num:(va_int_range 0 18446744073709551615)) = (if win then va_get_reg64 rR8 va_s0 else va_get_reg64 rRdx va_s0) in let (k_ptr:(va_int_range 0 18446744073709551615)) = (if win then va_get_reg64 rR9 va_s0 else va_get_reg64 rRcx va_s0) in va_get_reg64 rRsp va_s0 == Vale.X64.Stack_i.init_rsp (va_get_stack va_s0) /\ Vale.X64.Memory.is_initial_heap (va_get_mem_layout va_s0) (va_get_mem va_s0) /\ (sha_enabled /\ sse_enabled) /\ l_or (Vale.X64.Decls.locs_disjoint ([Vale.X64.Decls.loc_buffer #Vale.X64.Memory.vuint128 ctx_b; Vale.X64.Decls.loc_buffer #Vale.X64.Memory.vuint128 in_b])) (ctx_b == in_b) /\ l_or (Vale.X64.Decls.locs_disjoint ([Vale.X64.Decls.loc_buffer #Vale.X64.Memory.vuint128 ctx_b; Vale.X64.Decls.loc_buffer #Vale.X64.Memory.vuint128 k_b])) (ctx_b == k_b) /\ l_or (Vale.X64.Decls.locs_disjoint ([Vale.X64.Decls.loc_buffer #Vale.X64.Memory.vuint128 in_b; Vale.X64.Decls.loc_buffer #Vale.X64.Memory.vuint128 k_b])) (in_b == k_b) /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem va_s0) ctx_ptr ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem va_s0) in_ptr in_b (4 `op_Multiply` num) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem va_s0) k_ptr k_b 16 (va_get_mem_layout va_s0) Secret /\ num_val == num /\ in_ptr + 64 `op_Multiply` num < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 ctx_b == 2 /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 in_b == 4 `op_Multiply` num /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let (ctx_ptr:(va_int_range 0 18446744073709551615)) = (if win then va_get_reg64 rRcx va_s0 else va_get_reg64 rRdi va_s0) in let (in_ptr:(va_int_range 0 18446744073709551615)) = (if win then va_get_reg64 rRdx va_s0 else va_get_reg64 rRsi va_s0) in let (num:(va_int_range 0 18446744073709551615)) = (if win then va_get_reg64 rR8 va_s0 else va_get_reg64 rRdx va_s0) in let (k_ptr:(va_int_range 0 18446744073709551615)) = (if win then va_get_reg64 rR9 va_s0 else va_get_reg64 rRcx va_s0) in let hash_in = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem va_s0) ctx_b)) in let hash_out = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem va_sM) ctx_b)) in (let input_LE = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem va_sM) in_b)) in l_and (FStar.Seq.Base.length #FStar.UInt8.t input_LE `op_Modulus` 64 == 0) (hash_out == Vale.SHA.SHA_helpers.update_multi_transparent hash_in input_LE)) /\ Vale.X64.Decls.modifies_mem (Vale.X64.Decls.loc_buffer #Vale.X64.Memory.vuint128 ctx_b) (va_get_mem va_s0) (va_get_mem va_sM) /\ va_get_reg64 rRsp va_sM == va_get_reg64 rRsp va_s0 /\ (win ==> va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0) /\ (win ==> va_get_reg64 rRbp va_sM == va_get_reg64 rRbp va_s0) /\ (win ==> va_get_reg64 rRdi va_sM == va_get_reg64 rRdi va_s0) /\ (win ==> va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0) /\ (win ==> va_get_reg64 rR12 va_sM == va_get_reg64 rR12 va_s0) /\ (win ==> va_get_reg64 rR13 va_sM == va_get_reg64 rR13 va_s0) /\ (win ==> va_get_reg64 rR14 va_sM == va_get_reg64 rR14 va_s0) /\ (win ==> va_get_reg64 rR15 va_sM == va_get_reg64 rR15 va_s0) /\ (~win ==> va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0) /\ (~win ==> va_get_reg64 rRbp va_sM == va_get_reg64 rRbp va_s0) /\ (~win ==> va_get_reg64 rR12 va_sM == va_get_reg64 rR12 va_s0) /\ (~win ==> va_get_reg64 rR13 va_sM == va_get_reg64 rR13 va_s0) /\ (~win ==> va_get_reg64 rR14 va_sM == va_get_reg64 rR14 va_s0) /\ (~win ==> va_get_reg64 rR15 va_sM == va_get_reg64 rR15 va_s0) /\ (win ==> va_get_xmm 6 va_sM == va_get_xmm 6 va_s0) /\ (win ==> va_get_xmm 7 va_sM == va_get_xmm 7 va_s0) /\ (win ==> va_get_xmm 8 va_sM == va_get_xmm 8 va_s0) /\ (win ==> va_get_xmm 9 va_sM == va_get_xmm 9 va_s0) /\ (win ==> va_get_xmm 10 va_sM == va_get_xmm 10 va_s0) /\ (win ==> va_get_xmm 11 va_sM == va_get_xmm 11 va_s0) /\ (win ==> va_get_xmm 12 va_sM == va_get_xmm 12 va_s0) /\ (win ==> va_get_xmm 13 va_sM == va_get_xmm 13 va_s0) /\ (win ==> va_get_xmm 14 va_sM == va_get_xmm 14 va_s0) /\ (win ==> va_get_xmm 15 va_sM == va_get_xmm 15 va_s0)) /\ va_state_eq va_sM (va_update_stackTaint va_sM (va_update_stack va_sM (va_update_mem_layout va_sM (va_update_mem_heaplet 0 va_sM (va_update_flags va_sM (va_update_xmm 15 va_sM (va_update_xmm 14 va_sM (va_update_xmm 13 va_sM (va_update_xmm 12 va_sM (va_update_xmm 11 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rR15 va_sM (va_update_reg64 rR14 va_sM (va_update_reg64 rR13 va_sM (va_update_reg64 rR12 va_sM (va_update_reg64 rR11 va_sM (va_update_reg64 rR10 va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rR8 va_sM (va_update_reg64 rRsp va_sM (va_update_reg64 rRbp va_sM (va_update_reg64 rRdi va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))))))))))))))))))))))))))))))))))))
[ { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.CPU_Features_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack", "short_module": null }, { "abbrev": false, "full_module": "Spec.Loops", "short_module": null }, { "abbrev": false, "full_module": "Spec.Hash.Definitions", "short_module": null }, { "abbrev": false, "full_module": "Spec.Agile.Hash", "short_module": null }, { "abbrev": false, "full_module": "Spec.SHA2", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA.SHA_helpers", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCodes", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.QuickCode", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsSha", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsVector", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsStack", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsMem", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.InsBasic", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Decls", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.State", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Stack_i", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Memory", "short_module": null }, { "abbrev": false, "full_module": "Vale.X64.Machine_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.HeapImpl", "short_module": null }, { "abbrev": false, "full_module": "Vale.Arch.Types", "short_module": null }, { "abbrev": false, "full_module": "FStar.Seq", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words.Seq_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Words_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Types_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.Def.Opaque_s", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "Vale.SHA", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let va_lemma_Sha_update_bytes_stdcall va_b0 va_s0 win ctx_b in_b num_val k_b = let (va_mods:va_mods_t) = [va_Mod_stackTaint; va_Mod_stack; va_Mod_mem_layout; va_Mod_mem_heaplet 0; va_Mod_flags; va_Mod_xmm 15; va_Mod_xmm 14; va_Mod_xmm 13; va_Mod_xmm 12; va_Mod_xmm 11; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rR15; va_Mod_reg64 rR14; va_Mod_reg64 rR13; va_Mod_reg64 rR12; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9; va_Mod_reg64 rR8; va_Mod_reg64 rRsp; va_Mod_reg64 rRbp; va_Mod_reg64 rRdi; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Sha_update_bytes_stdcall va_mods win ctx_b in_b num_val k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Sha_update_bytes_stdcall win) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 735 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (let (ctx_ptr:(va_int_range 0 18446744073709551615)) = va_if win (fun _ -> va_get_reg64 rRcx va_s0) (fun _ -> va_get_reg64 rRdi va_s0) in let (in_ptr:(va_int_range 0 18446744073709551615)) = va_if win (fun _ -> va_get_reg64 rRdx va_s0) (fun _ -> va_get_reg64 rRsi va_s0) in let (num:(va_int_range 0 18446744073709551615)) = va_if win (fun _ -> va_get_reg64 rR8 va_s0) (fun _ -> va_get_reg64 rRdx va_s0) in let (k_ptr:(va_int_range 0 18446744073709551615)) = va_if win (fun _ -> va_get_reg64 rR9 va_s0) (fun _ -> va_get_reg64 rRcx va_s0) in label va_range1 "***** POSTCONDITION NOT MET AT line 776 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_in = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem va_s0) ctx_b)) in label va_range1 "***** POSTCONDITION NOT MET AT line 777 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_out = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem va_sM) ctx_b)) in label va_range1 "***** POSTCONDITION NOT MET AT line 781 column 102 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem va_sM) in_b)) in l_and (FStar.Seq.Base.length #FStar.UInt8.t input_LE `op_Modulus` 64 == 0) (hash_out == Vale.SHA.SHA_helpers.update_multi_transparent hash_in input_LE)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 784 column 55 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_mem (Vale.X64.Decls.loc_buffer #Vale.X64.Memory.vuint128 ctx_b) (va_get_mem va_s0) (va_get_mem va_sM)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 786 column 24 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsp va_sM == va_get_reg64 rRsp va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 788 column 33 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 789 column 33 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_reg64 rRbp va_sM == va_get_reg64 rRbp va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 790 column 33 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_reg64 rRdi va_sM == va_get_reg64 rRdi va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 791 column 33 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 792 column 33 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_reg64 rR12 va_sM == va_get_reg64 rR12 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 793 column 33 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_reg64 rR13 va_sM == va_get_reg64 rR13 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 794 column 33 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_reg64 rR14 va_sM == va_get_reg64 rR14 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 795 column 33 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_reg64 rR15 va_sM == va_get_reg64 rR15 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 796 column 34 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~win ==> va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 797 column 34 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~win ==> va_get_reg64 rRbp va_sM == va_get_reg64 rRbp va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 798 column 34 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~win ==> va_get_reg64 rR12 va_sM == va_get_reg64 rR12 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 799 column 34 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~win ==> va_get_reg64 rR13 va_sM == va_get_reg64 rR13 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 800 column 34 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~win ==> va_get_reg64 rR14 va_sM == va_get_reg64 rR14 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 801 column 34 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~win ==> va_get_reg64 rR15 va_sM == va_get_reg64 rR15 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 802 column 35 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_xmm 6 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 803 column 35 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_xmm 7 va_sM == va_get_xmm 7 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 804 column 35 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_xmm 8 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 805 column 35 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_xmm 9 va_sM == va_get_xmm 9 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 806 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_xmm 10 va_sM == va_get_xmm 10 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 807 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_xmm 11 va_sM == va_get_xmm 11 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 808 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_xmm 12 va_sM == va_get_xmm 12 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 809 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_xmm 13 va_sM == va_get_xmm 13 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 810 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_xmm 14 va_sM == va_get_xmm 14 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 811 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_xmm 15 va_sM == va_get_xmm 15 va_s0))))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_stackTaint; va_Mod_stack; va_Mod_mem_layout; va_Mod_mem_heaplet 0; va_Mod_flags; va_Mod_xmm 15; va_Mod_xmm 14; va_Mod_xmm 13; va_Mod_xmm 12; va_Mod_xmm 11; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rR15; va_Mod_reg64 rR14; va_Mod_reg64 rR13; va_Mod_reg64 rR12; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9; va_Mod_reg64 rR8; va_Mod_reg64 rRsp; va_Mod_reg64 rRbp; va_Mod_reg64 rRdi; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM)
val va_lemma_Sha_update_bytes_stdcall : va_b0:va_code -> va_s0:va_state -> win:bool -> ctx_b:buffer128 -> in_b:buffer128 -> num_val:nat64 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Sha_update_bytes_stdcall win) va_s0 /\ va_get_ok va_s0 /\ (let (ctx_ptr:(va_int_range 0 18446744073709551615)) = (if win then va_get_reg64 rRcx va_s0 else va_get_reg64 rRdi va_s0) in let (in_ptr:(va_int_range 0 18446744073709551615)) = (if win then va_get_reg64 rRdx va_s0 else va_get_reg64 rRsi va_s0) in let (num:(va_int_range 0 18446744073709551615)) = (if win then va_get_reg64 rR8 va_s0 else va_get_reg64 rRdx va_s0) in let (k_ptr:(va_int_range 0 18446744073709551615)) = (if win then va_get_reg64 rR9 va_s0 else va_get_reg64 rRcx va_s0) in va_get_reg64 rRsp va_s0 == Vale.X64.Stack_i.init_rsp (va_get_stack va_s0) /\ Vale.X64.Memory.is_initial_heap (va_get_mem_layout va_s0) (va_get_mem va_s0) /\ (sha_enabled /\ sse_enabled) /\ l_or (Vale.X64.Decls.locs_disjoint ([Vale.X64.Decls.loc_buffer #Vale.X64.Memory.vuint128 ctx_b; Vale.X64.Decls.loc_buffer #Vale.X64.Memory.vuint128 in_b])) (ctx_b == in_b) /\ l_or (Vale.X64.Decls.locs_disjoint ([Vale.X64.Decls.loc_buffer #Vale.X64.Memory.vuint128 ctx_b; Vale.X64.Decls.loc_buffer #Vale.X64.Memory.vuint128 k_b])) (ctx_b == k_b) /\ l_or (Vale.X64.Decls.locs_disjoint ([Vale.X64.Decls.loc_buffer #Vale.X64.Memory.vuint128 in_b; Vale.X64.Decls.loc_buffer #Vale.X64.Memory.vuint128 k_b])) (in_b == k_b) /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem va_s0) ctx_ptr ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem va_s0) in_ptr in_b (4 `op_Multiply` num) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem va_s0) k_ptr k_b 16 (va_get_mem_layout va_s0) Secret /\ num_val == num /\ in_ptr + 64 `op_Multiply` num < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 ctx_b == 2 /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 in_b == 4 `op_Multiply` num /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let (ctx_ptr:(va_int_range 0 18446744073709551615)) = (if win then va_get_reg64 rRcx va_s0 else va_get_reg64 rRdi va_s0) in let (in_ptr:(va_int_range 0 18446744073709551615)) = (if win then va_get_reg64 rRdx va_s0 else va_get_reg64 rRsi va_s0) in let (num:(va_int_range 0 18446744073709551615)) = (if win then va_get_reg64 rR8 va_s0 else va_get_reg64 rRdx va_s0) in let (k_ptr:(va_int_range 0 18446744073709551615)) = (if win then va_get_reg64 rR9 va_s0 else va_get_reg64 rRcx va_s0) in let hash_in = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem va_s0) ctx_b)) in let hash_out = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem va_sM) ctx_b)) in (let input_LE = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem va_sM) in_b)) in l_and (FStar.Seq.Base.length #FStar.UInt8.t input_LE `op_Modulus` 64 == 0) (hash_out == Vale.SHA.SHA_helpers.update_multi_transparent hash_in input_LE)) /\ Vale.X64.Decls.modifies_mem (Vale.X64.Decls.loc_buffer #Vale.X64.Memory.vuint128 ctx_b) (va_get_mem va_s0) (va_get_mem va_sM) /\ va_get_reg64 rRsp va_sM == va_get_reg64 rRsp va_s0 /\ (win ==> va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0) /\ (win ==> va_get_reg64 rRbp va_sM == va_get_reg64 rRbp va_s0) /\ (win ==> va_get_reg64 rRdi va_sM == va_get_reg64 rRdi va_s0) /\ (win ==> va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0) /\ (win ==> va_get_reg64 rR12 va_sM == va_get_reg64 rR12 va_s0) /\ (win ==> va_get_reg64 rR13 va_sM == va_get_reg64 rR13 va_s0) /\ (win ==> va_get_reg64 rR14 va_sM == va_get_reg64 rR14 va_s0) /\ (win ==> va_get_reg64 rR15 va_sM == va_get_reg64 rR15 va_s0) /\ (~win ==> va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0) /\ (~win ==> va_get_reg64 rRbp va_sM == va_get_reg64 rRbp va_s0) /\ (~win ==> va_get_reg64 rR12 va_sM == va_get_reg64 rR12 va_s0) /\ (~win ==> va_get_reg64 rR13 va_sM == va_get_reg64 rR13 va_s0) /\ (~win ==> va_get_reg64 rR14 va_sM == va_get_reg64 rR14 va_s0) /\ (~win ==> va_get_reg64 rR15 va_sM == va_get_reg64 rR15 va_s0) /\ (win ==> va_get_xmm 6 va_sM == va_get_xmm 6 va_s0) /\ (win ==> va_get_xmm 7 va_sM == va_get_xmm 7 va_s0) /\ (win ==> va_get_xmm 8 va_sM == va_get_xmm 8 va_s0) /\ (win ==> va_get_xmm 9 va_sM == va_get_xmm 9 va_s0) /\ (win ==> va_get_xmm 10 va_sM == va_get_xmm 10 va_s0) /\ (win ==> va_get_xmm 11 va_sM == va_get_xmm 11 va_s0) /\ (win ==> va_get_xmm 12 va_sM == va_get_xmm 12 va_s0) /\ (win ==> va_get_xmm 13 va_sM == va_get_xmm 13 va_s0) /\ (win ==> va_get_xmm 14 va_sM == va_get_xmm 14 va_s0) /\ (win ==> va_get_xmm 15 va_sM == va_get_xmm 15 va_s0)) /\ va_state_eq va_sM (va_update_stackTaint va_sM (va_update_stack va_sM (va_update_mem_layout va_sM (va_update_mem_heaplet 0 va_sM (va_update_flags va_sM (va_update_xmm 15 va_sM (va_update_xmm 14 va_sM (va_update_xmm 13 va_sM (va_update_xmm 12 va_sM (va_update_xmm 11 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rR15 va_sM (va_update_reg64 rR14 va_sM (va_update_reg64 rR13 va_sM (va_update_reg64 rR12 va_sM (va_update_reg64 rR11 va_sM (va_update_reg64 rR10 va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rR8 va_sM (va_update_reg64 rRsp va_sM (va_update_reg64 rRbp va_sM (va_update_reg64 rRdi va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))))))))))))))))))))))))))))))))))) let va_lemma_Sha_update_bytes_stdcall va_b0 va_s0 win ctx_b in_b num_val k_b =
false
null
false
let va_mods:va_mods_t = [ va_Mod_stackTaint; va_Mod_stack; va_Mod_mem_layout; va_Mod_mem_heaplet 0; va_Mod_flags; va_Mod_xmm 15; va_Mod_xmm 14; va_Mod_xmm 13; va_Mod_xmm 12; va_Mod_xmm 11; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rR15; va_Mod_reg64 rR14; va_Mod_reg64 rR13; va_Mod_reg64 rR12; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9; va_Mod_reg64 rR8; va_Mod_reg64 rRsp; va_Mod_reg64 rRbp; va_Mod_reg64 rRdi; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok; va_Mod_mem ] in let va_qc = va_qcode_Sha_update_bytes_stdcall va_mods win ctx_b in_b num_val k_b in let va_sM, va_fM, va_g = va_wp_sound_code_norm (va_code_Sha_update_bytes_stdcall win) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 735 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (let ctx_ptr:(va_int_range 0 18446744073709551615) = va_if win (fun _ -> va_get_reg64 rRcx va_s0) (fun _ -> va_get_reg64 rRdi va_s0) in let in_ptr:(va_int_range 0 18446744073709551615) = va_if win (fun _ -> va_get_reg64 rRdx va_s0) (fun _ -> va_get_reg64 rRsi va_s0) in let num:(va_int_range 0 18446744073709551615) = va_if win (fun _ -> va_get_reg64 rR8 va_s0) (fun _ -> va_get_reg64 rRdx va_s0) in let k_ptr:(va_int_range 0 18446744073709551615) = va_if win (fun _ -> va_get_reg64 rR9 va_s0) (fun _ -> va_get_reg64 rRcx va_s0) in label va_range1 "***** POSTCONDITION NOT MET AT line 776 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_in = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem va_s0) ctx_b)) in label va_range1 "***** POSTCONDITION NOT MET AT line 777 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_out = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem va_sM) ctx_b)) in label va_range1 "***** POSTCONDITION NOT MET AT line 781 column 102 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem va_sM) in_b)) in l_and ((FStar.Seq.Base.length #FStar.UInt8.t input_LE) `op_Modulus` 64 == 0) (hash_out == Vale.SHA.SHA_helpers.update_multi_transparent hash_in input_LE) ) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 784 column 55 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_mem (Vale.X64.Decls.loc_buffer #Vale.X64.Memory.vuint128 ctx_b) (va_get_mem va_s0) (va_get_mem va_sM)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 786 column 24 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsp va_sM == va_get_reg64 rRsp va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 788 column 33 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 789 column 33 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_reg64 rRbp va_sM == va_get_reg64 rRbp va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 790 column 33 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_reg64 rRdi va_sM == va_get_reg64 rRdi va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 791 column 33 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 792 column 33 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_reg64 rR12 va_sM == va_get_reg64 rR12 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 793 column 33 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_reg64 rR13 va_sM == va_get_reg64 rR13 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 794 column 33 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_reg64 rR14 va_sM == va_get_reg64 rR14 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 795 column 33 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_reg64 rR15 va_sM == va_get_reg64 rR15 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 796 column 34 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~win ==> va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 797 column 34 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~win ==> va_get_reg64 rRbp va_sM == va_get_reg64 rRbp va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 798 column 34 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~win ==> va_get_reg64 rR12 va_sM == va_get_reg64 rR12 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 799 column 34 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~win ==> va_get_reg64 rR13 va_sM == va_get_reg64 rR13 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 800 column 34 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~win ==> va_get_reg64 rR14 va_sM == va_get_reg64 rR14 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 801 column 34 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~win ==> va_get_reg64 rR15 va_sM == va_get_reg64 rR15 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 802 column 35 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_xmm 6 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 803 column 35 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_xmm 7 va_sM == va_get_xmm 7 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 804 column 35 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_xmm 8 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 805 column 35 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_xmm 9 va_sM == va_get_xmm 9 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 806 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_xmm 10 va_sM == va_get_xmm 10 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 807 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_xmm 11 va_sM == va_get_xmm 11 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 808 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_xmm 12 va_sM == va_get_xmm 12 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 809 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_xmm 13 va_sM == va_get_xmm 13 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 810 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_xmm 14 va_sM == va_get_xmm 14 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 811 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (win ==> va_get_xmm 15 va_sM == va_get_xmm 15 va_s0))))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([ va_Mod_stackTaint; va_Mod_stack; va_Mod_mem_layout; va_Mod_mem_heaplet 0; va_Mod_flags; va_Mod_xmm 15; va_Mod_xmm 14; va_Mod_xmm 13; va_Mod_xmm 12; va_Mod_xmm 11; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rR15; va_Mod_reg64 rR14; va_Mod_reg64 rR13; va_Mod_reg64 rR12; va_Mod_reg64 rR11; va_Mod_reg64 rR10; va_Mod_reg64 rR9; va_Mod_reg64 rR8; va_Mod_reg64 rRsp; va_Mod_reg64 rRbp; va_Mod_reg64 rRdi; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_reg64 rRcx; va_Mod_reg64 rRbx; va_Mod_reg64 rRax; va_Mod_ok; va_Mod_mem ]) va_sM va_s0; (va_sM, va_fM)
{ "checked_file": "Vale.SHA.X64.fst.checked", "dependencies": [ "Vale.X64.State.fsti.checked", "Vale.X64.Stack_i.fsti.checked", "Vale.X64.Stack.fsti.checked", "Vale.X64.QuickCodes.fsti.checked", "Vale.X64.QuickCode.fst.checked", "Vale.X64.Memory.fsti.checked", "Vale.X64.Machine_s.fst.checked", "Vale.X64.InsVector.fsti.checked", "Vale.X64.InsStack.fsti.checked", "Vale.X64.InsSha.fsti.checked", "Vale.X64.InsMem.fsti.checked", "Vale.X64.InsBasic.fsti.checked", "Vale.X64.Flags.fsti.checked", "Vale.X64.Decls.fsti.checked", "Vale.X64.CPU_Features_s.fst.checked", "Vale.SHA.SHA_helpers.fsti.checked", "Vale.Def.Words_s.fsti.checked", "Vale.Def.Words.Seq_s.fsti.checked", "Vale.Def.Types_s.fst.checked", "Vale.Def.Opaque_s.fsti.checked", "Vale.Arch.Types.fsti.checked", "Vale.Arch.HeapImpl.fsti.checked", "Spec.SHA2.fsti.checked", "Spec.Loops.fst.checked", "Spec.Hash.Definitions.fst.checked", "Spec.Agile.Hash.fsti.checked", "prims.fst.checked", "FStar.UInt8.fsti.checked", "FStar.Seq.Base.fsti.checked", "FStar.Seq.fst.checked", "FStar.Pervasives.Native.fst.checked", "FStar.Pervasives.fsti.checked" ], "interface_file": true, "source_file": "Vale.SHA.X64.fst" }
[]
[ "Vale.X64.Decls.va_code", "Vale.X64.Decls.va_state", "Prims.bool", "Vale.X64.Memory.buffer128", "Vale.X64.Memory.nat64", "Vale.X64.QuickCodes.fuel", "Prims.unit", "FStar.Pervasives.Native.Mktuple2", "Vale.X64.Decls.va_fuel", "Vale.X64.QuickCode.va_lemma_norm_mods", "Prims.Cons", "Vale.X64.QuickCode.mod_t", "Vale.X64.QuickCode.va_Mod_stackTaint", "Vale.X64.QuickCode.va_Mod_stack", "Vale.X64.QuickCode.va_Mod_mem_layout", "Vale.X64.QuickCode.va_Mod_mem_heaplet", "Vale.X64.QuickCode.va_Mod_flags", "Vale.X64.QuickCode.va_Mod_xmm", "Vale.X64.QuickCode.va_Mod_reg64", "Vale.X64.Machine_s.rR15", "Vale.X64.Machine_s.rR14", "Vale.X64.Machine_s.rR13", "Vale.X64.Machine_s.rR12", "Vale.X64.Machine_s.rR11", "Vale.X64.Machine_s.rR10", "Vale.X64.Machine_s.rR9", "Vale.X64.Machine_s.rR8", "Vale.X64.Machine_s.rRsp", "Vale.X64.Machine_s.rRbp", "Vale.X64.Machine_s.rRdi", "Vale.X64.Machine_s.rRsi", "Vale.X64.Machine_s.rRdx", "Vale.X64.Machine_s.rRcx", "Vale.X64.Machine_s.rRbx", "Vale.X64.Machine_s.rRax", "Vale.X64.QuickCode.va_Mod_ok", "Vale.X64.QuickCode.va_Mod_mem", "Prims.Nil", "FStar.Pervasives.assert_norm", "Prims.eq2", "Prims.list", "Vale.X64.QuickCode.__proj__QProc__item__mods", "Vale.SHA.X64.va_code_Sha_update_bytes_stdcall", "FStar.Pervasives.Native.tuple2", "FStar.Pervasives.Native.tuple3", "Vale.X64.State.vale_state", "Vale.X64.QuickCodes.va_wp_sound_code_norm", "Prims.l_and", "Vale.X64.QuickCodes.label", "Vale.X64.QuickCodes.va_range1", "Prims.b2t", "Vale.X64.Decls.va_get_ok", "Prims.int", "Prims.op_Modulus", "FStar.Seq.Base.length", "FStar.UInt8.t", "Vale.SHA.SHA_helpers.hash256", "Vale.SHA.SHA_helpers.update_multi_transparent", "FStar.Seq.Base.seq", "Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8", "Vale.Def.Types_s.le_seq_quad32_to_bytes", "Vale.X64.Decls.buffer128_as_seq", "Vale.X64.Decls.va_get_mem", "Vale.X64.Decls.modifies_mem", "Vale.X64.Decls.loc_buffer", "Vale.X64.Memory.vuint128", "Vale.Def.Types_s.nat64", "Vale.X64.Decls.va_get_reg64", "Prims.l_imp", "Prims.l_not", "Vale.X64.Decls.quad32", "Vale.X64.Decls.va_get_xmm", "Vale.SHA.SHA_helpers.le_bytes_to_hash", "Vale.X64.Decls.va_int_range", "Vale.X64.Decls.va_if", "Vale.X64.QuickCode.quickCode", "Vale.SHA.X64.va_qcode_Sha_update_bytes_stdcall" ]
[]
module Vale.SHA.X64 open Vale.Def.Opaque_s open Vale.Def.Types_s open Vale.Def.Words_s open Vale.Def.Words.Seq_s open FStar.Seq open Vale.Arch.Types open Vale.Arch.HeapImpl open Vale.X64.Machine_s open Vale.X64.Memory open Vale.X64.Stack_i open Vale.X64.State open Vale.X64.Decls open Vale.X64.InsBasic open Vale.X64.InsMem open Vale.X64.InsStack open Vale.X64.InsVector open Vale.X64.InsSha open Vale.X64.QuickCode open Vale.X64.QuickCodes open Vale.SHA.SHA_helpers open Spec.SHA2 open Spec.Agile.Hash open Spec.Hash.Definitions open Spec.Loops open Vale.X64.Stack open Vale.X64.CPU_Features_s #reset-options "--z3rlimit 40" //-- Preamble val va_code_Preamble : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Preamble () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_CCons (va_code_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_CNil ()))))))))))) val va_codegen_success_Preamble : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Preamble () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret) (va_pbool_and (va_codegen_success_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (va_ttrue ())))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Preamble (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 87 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 1) (va_op_reg_opr64_reg64 rRdi) 0 Secret ctx_b 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 88 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 2) (va_op_reg_opr64_reg64 rRdi) 16 Secret ctx_b 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 89 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_InitPshufbStableMask (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 91 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 92 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 93 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 95 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 8) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 96 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 98 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 2) (va_op_xmm_xmm 0) 0) (fun (va_s:va_state) _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 99 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))))) val va_lemma_Preamble : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Preamble ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0)))))))))) [@"opaque_to_smt"] let va_lemma_Preamble va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok] in let va_qc = va_qcode_Preamble va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Preamble ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 57 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 74 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 75 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 80 column 63 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Preamble (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax va_s0)))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_sM /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in l_and (l_and (va_get_xmm 1 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__lo1 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__lo1 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__lo0 abcd)) (va_get_xmm 2 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 (Vale.Def.Words_s.__proj__Mkfour__item__hi3 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 efgh) (Vale.Def.Words_s.__proj__Mkfour__item__hi3 abcd) (Vale.Def.Words_s.__proj__Mkfour__item__hi2 abcd))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh))) ==> va_k va_sM (()))) val va_wpProof_Preamble : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Preamble ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Preamble ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Preamble (va_code_Preamble ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM va_s0))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Preamble (ctx_b:buffer128) : (va_quickCode unit (va_code_Preamble ())) = (va_QProc (va_code_Preamble ()) ([va_Mod_flags; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax]) (va_wp_Preamble ctx_b) (va_wpProof_Preamble ctx_b)) //-- //-- Loop_rounds_0_15 val va_code_Loop_rounds_0_15 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_0_15 () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ())))))))))))))))))))))))))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_0_15 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_0_15 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ())))))))))))))))))))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_0_15 (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 146 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 149 column 25 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_quads_to_block input_BE) (let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (va_arg79:Vale.SHA.SHA_helpers.block_w) = block in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 153 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_repeat_range_0_vale va_arg79 hash_orig) (let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 158 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 3) (va_op_reg_opr64_reg64 rRsi) 0 Secret in_b (offset + 0)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 159 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 4) (va_op_reg_opr64_reg64 rRsi) 16 Secret in_b (offset + 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 160 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 5) (va_op_reg_opr64_reg64 rRsi) 32 Secret in_b (offset + 2)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 161 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 162 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 163 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRsi) 48 Secret in_b (offset + 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 165 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 0 Secret k_b 0) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 0) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 166 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 0) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 167 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 169 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 170 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 171 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 10) (va_op_xmm_xmm 2)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 174 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 0 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 175 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 176 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 9) (va_op_xmm_xmm 1)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 177 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 2 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 180 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 16 Secret k_b 1) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 1) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 181 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 1) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 182 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 183 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 184 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 185 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 4 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 186 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 187 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Add64 (va_op_dst_opr64_reg64 rRsi) (va_const_opr64 64)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 188 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 189 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 6 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 192 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 32 Secret k_b 2) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 2) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 193 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 2) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 194 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 195 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PshufbStable (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.Def.Types_s.quad32 input_BE 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 196 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_s == FStar.Seq.Base.index #Vale.Def.Types_s.quad32 input_BE 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 197 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 8 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 198 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 199 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 200 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 201 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 3) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 202 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5) 20 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 203 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 10 block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 206 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) 48 Secret k_b 3) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 3) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 207 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 208 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 209 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 3) (va_op_xmm_xmm 6) 16 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 210 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) 12 block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 211 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 212 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 213 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 214 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 4) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 215 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 5) (va_op_xmm_xmm 6) 24 block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 216 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 14 block hash_orig) (va_QEmpty (()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_0_15 : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_0_15 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_0_15 va_b0 va_s0 in_b k_b offset = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_0_15 va_mods in_b k_b offset in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_0_15 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 102 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 128 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 138 column 37 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 141 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 9 va_sM == va_get_xmm 1 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 142 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 10 va_sM == va_get_xmm 2 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi va_s0))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) offset (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in l_and (l_and (l_and (l_and (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale 16 block (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))) (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 16 block)) (va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 20 block) (Vale.SHA.SHA_helpers.ws_quad32 13 block))) (va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial 24 block)) (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 12 block)) /\ va_get_xmm 9 va_sM == va_get_xmm 1 va_s0 /\ va_get_xmm 10 va_sM == va_get_xmm 2 va_s0) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_0_15 : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_0_15 in_b k_b offset va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_0_15 in_b k_b offset va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_0_15 (va_code_Loop_rounds_0_15 ()) va_s0 in_b k_b offset in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_0_15 (in_b:buffer128) (k_b:buffer128) (offset:nat) : (va_quickCode unit (va_code_Loop_rounds_0_15 ())) = (va_QProc (va_code_Loop_rounds_0_15 ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds_0_15 in_b k_b offset) (va_wpProof_Loop_rounds_0_15 in_b k_b offset)) //-- //-- Loop_rounds_16_51_body val va_code_Loop_rounds_16_51_body : i:nat -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_16_51_body i = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CNil ()))))))))))))) val va_codegen_success_Loop_rounds_16_51_body : i:nat -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_16_51_body i = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_ttrue ()))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_16_51_body (va_mods:va_mods_t) (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 259 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` i) Secret k_b i) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks i) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 260 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks i) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 262 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 263 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 264 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` i) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 265 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 266 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 267 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 268 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 269 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg1 (va_op_xmm_xmm 6) (va_op_xmm_xmm 3) (4 `op_Multiply` (i + 3)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 270 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` i + 2) block hash_orig) (va_QEmpty (()))))))))))))))) val va_lemma_Loop_rounds_16_51_body : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_body i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51_body va_b0 va_s0 i k_b block hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_16_51_body va_mods i k_b block hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_16_51_body i) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 219 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 251 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 253 column 42 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 254 column 87 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 255 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 256 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` i) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 4 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 5 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51_body : i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51_body (va_code_Loop_rounds_16_51_body i) va_s0 i k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51_body (i:nat) (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51_body i)) = (va_QProc (va_code_Loop_rounds_16_51_body i) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51_body i k_b block hash_orig) (va_wpProof_Loop_rounds_16_51_body i k_b block hash_orig)) //-- //-- Msg_shift val va_code_Msg_shift : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Msg_shift () = (va_Block (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_CNil ())))))))) val va_codegen_success_Msg_shift : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Msg_shift () = (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Msg_shift (va_mods:va_mods_t) : (va_quickCode unit (va_code_Msg_shift ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 290 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 291 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 0) (va_op_xmm_xmm 6)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 292 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 3) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 293 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 4) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 294 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 6) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 295 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 5) (va_op_xmm_xmm 0)) (va_QEmpty (()))))))))) val va_lemma_Msg_shift : va_b0:va_code -> va_s0:va_state -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Msg_shift ()) va_s0 /\ va_get_ok va_s0 /\ sse_enabled)) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) /\ va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Msg_shift va_b0 va_s0 = let (va_mods:va_mods_t) = [va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok] in let va_qc = va_qcode_Msg_shift va_mods in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Msg_shift ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 276 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 285 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 286 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 4 va_sM == va_get_xmm 5 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 287 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 5 va_sM == va_get_xmm 6 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 288 column 26 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 6 va_sM == va_get_xmm 3 va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Msg_shift (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ sse_enabled /\ (forall (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm0:quad32) . let va_sM = va_upd_xmm 0 va_x_xmm0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 va_s0))))) in va_get_ok va_sM /\ (va_get_xmm 3 va_sM == va_get_xmm 4 va_s0 /\ va_get_xmm 4 va_sM == va_get_xmm 5 va_s0 /\ va_get_xmm 5 va_sM == va_get_xmm 6 va_s0 /\ va_get_xmm 6 va_sM == va_get_xmm 3 va_s0) ==> va_k va_sM (()))) val va_wpProof_Msg_shift : va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Msg_shift va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Msg_shift va_s0 va_k = let (va_sM, va_f0) = va_lemma_Msg_shift (va_code_Msg_shift ()) va_s0 in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_ok va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Msg_shift () : (va_quickCode unit (va_code_Msg_shift ())) = (va_QProc (va_code_Msg_shift ()) ([va_Mod_xmm 0; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3]) va_wp_Msg_shift va_wpProof_Msg_shift) //-- //-- Loop_rounds_16_51_recursive val va_code_Loop_rounds_16_51_recursive : i:nat -> Tot va_code(decreases %[i]) [@ "opaque_to_smt"] let rec va_code_Loop_rounds_16_51_recursive i = (va_Block (va_CCons (if (i > 4) then va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive (i - 1)) (va_CNil ())) else va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_16_51_body i) (va_CCons (va_code_Msg_shift ()) (va_CNil ()))))) val va_codegen_success_Loop_rounds_16_51_recursive : i:nat -> Tot va_pbool(decreases %[i]) [@ "opaque_to_smt"] let rec va_codegen_success_Loop_rounds_16_51_recursive i = (va_pbool_and (if (i > 4) then va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive (i - 1)) (va_ttrue ()) else va_ttrue ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51_body i) (va_pbool_and (va_codegen_success_Msg_shift ()) (va_ttrue ())))) val va_lemma_Loop_rounds_16_51_recursive : va_b0:va_code -> va_s0:va_state -> i:nat -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel)(decreases %[va_b0;va_s0;i;k_b;block;hash_orig]) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51_recursive i) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ l_and (4 <= i) (i < 13) /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let rec va_lemma_Loop_rounds_16_51_recursive va_b0 va_s0 i k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51_recursive) (va_code_Loop_rounds_16_51_recursive i); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let va_b11 = va_tl va_b1 in let va_c11 = va_hd va_b1 in let (va_fc11, va_s11) = ( if (i > 4) then ( let va_b12 = va_get_block va_c11 in let (va_s13, va_fc13) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b12) va_s0 (i - 1) k_b block hash_orig in let va_b13 = va_tl va_b12 in let (va_s11, va_f13) = va_lemma_empty_total va_s13 va_b13 in let va_fc11 = va_lemma_merge_total va_b12 va_s0 va_fc13 va_s13 va_f13 va_s11 in (va_fc11, va_s11) ) else ( let va_b14 = va_get_block va_c11 in let (va_s11, va_fc11) = va_lemma_empty_total va_s0 va_b14 in (va_fc11, va_s11) ) ) in let (va_s15, va_fc15) = va_lemma_Loop_rounds_16_51_body (va_hd va_b11) va_s11 i k_b block hash_orig in let va_b15 = va_tl va_b11 in let (va_s16, va_fc16) = va_lemma_Msg_shift (va_hd va_b15) va_s15 in let va_b16 = va_tl va_b15 in let (va_sM, va_f16) = va_lemma_empty_total va_s16 va_b16 in let va_f15 = va_lemma_merge_total va_b15 va_s15 va_fc16 va_s16 va_f16 va_sM in let va_f11 = va_lemma_merge_total va_b11 va_s11 va_fc15 va_s15 va_f15 va_sM in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) //-- //-- Loop_rounds_16_51 val va_code_Loop_rounds_16_51 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt"] let va_code_Loop_rounds_16_51 () = (va_Block (va_CCons (va_code_Loop_rounds_16_51_recursive 12) (va_CNil ()))) val va_codegen_success_Loop_rounds_16_51 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt"] let va_codegen_success_Loop_rounds_16_51 () = (va_pbool_and (va_codegen_success_Loop_rounds_16_51_recursive 12) (va_ttrue ())) val va_lemma_Loop_rounds_16_51 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_16_51 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0)))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_16_51 va_b0 va_s0 k_b block hash_orig = va_reveal_opaque (`%va_code_Loop_rounds_16_51) (va_code_Loop_rounds_16_51 ()); let (va_old_s:va_state) = va_s0 in let (va_b1:va_codes) = va_get_block va_b0 in let (va_s11, va_fc11) = va_lemma_Loop_rounds_16_51_recursive (va_hd va_b1) va_s0 12 k_b block hash_orig in let va_b11 = va_tl va_b1 in let (va_sM, va_f11) = va_lemma_empty_total va_s11 va_b11 in let va_fM = va_lemma_merge_total va_b1 va_s0 va_fc11 va_s11 va_f11 va_sM in (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` 4) block hash_orig /\ l_and (l_and (l_and (va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` 4) block) (va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 1)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1) + 1) block))) (va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (4 + 2)) block)) (va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (4 - 1)) block)) /\ (forall (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 va_s0)))))))) in va_get_ok va_sM /\ (let i = 12 in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.repeat_range_vale (4 `op_Multiply` (i + 1)) block hash_orig /\ va_get_xmm 3 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` (i + 1)) block /\ va_get_xmm 4 va_sM == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 2)) block) (Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i + 1) block) /\ va_get_xmm 5 va_sM == Vale.SHA.SHA_helpers.ws_partial (4 `op_Multiply` (i + 3)) block /\ va_get_xmm 6 va_sM == Vale.SHA.SHA_helpers.ws_quad32 (4 `op_Multiply` i) block) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_16_51 : k_b:buffer128 -> block:block_w -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_16_51 k_b block hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_16_51 (va_code_Loop_rounds_16_51 ()) va_s0 k_b block hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_ok va_sM va_s0))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_16_51 (k_b:buffer128) (block:block_w) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds_16_51 ())) = (va_QProc (va_code_Loop_rounds_16_51 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0]) (va_wp_Loop_rounds_16_51 k_b block hash_orig) (va_wpProof_Loop_rounds_16_51 k_b block hash_orig)) //-- //-- Loop_rounds_52_64 val va_code_Loop_rounds_52_64 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds_52_64 () = (va_Block (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_CCons (va_code_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_CCons (va_code_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_CCons (va_code_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_CCons (va_code_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_CCons (va_code_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_CNil ()))))))))))))))))))))))))))))) val va_codegen_success_Loop_rounds_52_64 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds_52_64 () = (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4)) (va_pbool_and (va_codegen_success_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1)) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_pbool_and (va_codegen_success_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_pbool_and (va_codegen_success_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_pbool_and (va_codegen_success_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (va_ttrue ()))))))))))))))))))))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds_52_64 (va_mods:va_mods_t) (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s) (va_get_xmm 10 va_s) in let (ks:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 424 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 13) Secret k_b 13) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 13) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 425 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 13) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 426 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 427 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 4) (va_op_xmm_xmm 3) (4 `op_Multiply` (13 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 428 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 13) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 429 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 430 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 431 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr4 (va_op_xmm_xmm 7) (va_op_xmm_xmm 3)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 432 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 13 + 2) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 433 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 5) (va_op_xmm_xmm 7)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 435 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 14) Secret k_b 14) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 14) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 436 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 437 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 4)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 438 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 14) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 439 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 440 column 16 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_msg2 (va_op_xmm_xmm 5) (va_op_xmm_xmm 4) (4 `op_Multiply` (14 + 1)) block) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 441 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov128 (va_op_xmm_xmm 7) (va_op_xmm_xmm 8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 442 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 14 + 2) block hash_orig) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 444 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Load128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_xmm_xmm 0) (va_op_reg_opr64_reg64 rRcx) (16 `op_Multiply` 15) Secret k_b 15) (fun (va_s:va_state) _ -> va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_336 (s_337:(FStar.Seq.Base.seq a_336)) (i_338:Prims.nat) -> let (i_312:Prims.nat) = i_338 in Prims.b2t (Prims.op_LessThan i_312 (FStar.Seq.Base.length #a_336 s_337))) Vale.X64.Decls.quad32 ks 15) (fun _ -> va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 445 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 0 va_s == FStar.Seq.Base.index #Vale.X64.Decls.quad32 ks 15) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 446 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 0) (va_op_xmm_xmm 5)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 447 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 2) (va_op_xmm_xmm 1) (4 `op_Multiply` 15) block hash_orig) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 448 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 0) (va_op_xmm_xmm 0) 14) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 449 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sub64 (va_op_dst_opr64_reg64 rRdx) (va_const_opr64 1)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 450 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_SHA256_rnds2 (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) (4 `op_Multiply` 15 + 2) block hash_orig) (fun (va_s:va_state) _ -> let (abef_shuffle:quad32) = va_get_xmm 1 va_s in let (cdgh_shuffle:quad32) = va_get_xmm 2 va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 456 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 2) (va_op_xmm_xmm 10)) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 457 column 10 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Paddd (va_op_xmm_xmm 1) (va_op_xmm_xmm 9)) (fun (va_s:va_state) _ -> let (va_arg56:Vale.SHA.SHA_helpers.block_w) = block in let (va_arg55:Vale.Def.Types_s.quad32) = va_get_xmm 10 va_s in let (va_arg54:Vale.Def.Types_s.quad32) = va_get_xmm 9 va_s in let (va_arg53:Vale.Def.Types_s.quad32) = va_get_xmm 2 va_s in let (va_arg52:Vale.Def.Types_s.quad32) = va_get_xmm 1 va_s in let (va_arg51:Vale.Def.Types_s.quad32) = cdgh_shuffle in let (va_arg50:Vale.Def.Types_s.quad32) = abef_shuffle in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 459 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.update_lemma va_arg50 va_arg51 va_arg52 va_arg53 va_arg54 va_arg55 va_arg56) (va_QEmpty (())))))))))))))))))))))))))))))))))) val va_lemma_Loop_rounds_52_64 : va_b0:va_code -> va_s0:va_state -> k_b:buffer128 -> block:block_w -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds_52_64 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds_52_64 va_b0 va_s0 k_b block = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds_52_64 va_mods k_b block in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds_52_64 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 385 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 416 column 30 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 417 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 419 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRdx va_s0 > 0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_s0) (va_get_xmm 10 va_s0) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.repeat_range_vale 52 block hash_orig) /\ va_get_xmm 3 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 52 block /\ va_get_xmm 4 va_s0 == Vale.Arch.Types.add_wrap_quad32 (Vale.SHA.SHA_helpers.ws_partial 56 block) (Vale.SHA.SHA_helpers.ws_quad32 49 block) /\ va_get_xmm 5 va_s0 == Vale.SHA.SHA_helpers.ws_partial 60 block /\ va_get_xmm 6 va_s0 == Vale.SHA.SHA_helpers.ws_quad32 48 block) /\ (forall (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx va_s0))))))))) in va_get_ok va_sM /\ (va_get_xmm 7 va_sM == va_get_xmm 8 va_s0 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ (let hash_orig = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 9 va_sM) (va_get_xmm 10 va_sM) in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_block hash_orig block)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds_52_64 : k_b:buffer128 -> block:block_w -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds_52_64 k_b block va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds_52_64 k_b block va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds_52_64 (va_code_Loop_rounds_52_64 ()) va_s0 k_b block in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM va_s0)))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds_52_64 (k_b:buffer128) (block:block_w) : (va_quickCode unit (va_code_Loop_rounds_52_64 ())) = (va_QProc (va_code_Loop_rounds_52_64 ()) ([va_Mod_flags; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx]) (va_wp_Loop_rounds_52_64 k_b block) (va_wpProof_Loop_rounds_52_64 k_b block)) //-- //-- Loop_rounds val va_code_Loop_rounds : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_rounds () = (va_Block (va_CCons (va_Block (va_CNil ())) (va_CCons (va_code_Loop_rounds_0_15 ()) (va_CCons (va_code_Loop_rounds_16_51 ()) (va_CCons (va_code_Loop_rounds_52_64 ()) (va_CNil ())))))) val va_codegen_success_Loop_rounds : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_rounds () = (va_pbool_and (va_codegen_success_Loop_rounds_0_15 ()) (va_pbool_and (va_codegen_success_Loop_rounds_16_51 ()) (va_pbool_and (va_codegen_success_Loop_rounds_52_64 ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_rounds (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 508 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) offset (offset + 4) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in let (block:block_w) = Vale.SHA.SHA_helpers.quads_to_block input_BE in let (hash_init:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 514 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_0_15 in_b k_b offset) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 515 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_16_51 k_b block hash_init) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 516 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds_52_64 k_b block) (fun (va_s:va_state) _ -> let (va_arg27:Prims.nat) = offset in let (va_arg26:Vale.SHA.SHA_helpers.hash256) = hash_orig in let (va_arg25:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 518 column 29 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_quads va_arg25 va_arg26 va_arg27) (va_QEmpty (())))))))) val va_lemma_Loop_rounds : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop_rounds ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_rounds va_b0 va_s0 in_b k_b offset hash_orig = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop_rounds va_mods in_b k_b offset hash_orig in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_rounds ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 463 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 497 column 31 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 498 column 28 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 499 column 74 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 500 column 72 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 504 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrsOffset128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b offset 4 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 < pow2_64 /\ va_get_reg64 rRdx va_s0 > 0 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) in_b) 0 offset in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_s0 - 1 /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (offset + 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) ==> va_k va_sM (()))) val va_wpProof_Loop_rounds : in_b:buffer128 -> k_b:buffer128 -> offset:nat -> hash_orig:hash256 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop_rounds in_b k_b offset hash_orig va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_rounds in_b k_b offset hash_orig va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop_rounds (va_code_Loop_rounds ()) va_s0 in_b k_b offset hash_orig in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_rounds (in_b:buffer128) (k_b:buffer128) (offset:nat) (hash_orig:hash256) : (va_quickCode unit (va_code_Loop_rounds ())) = (va_QProc (va_code_Loop_rounds ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop_rounds in_b k_b offset hash_orig) (va_wpProof_Loop_rounds in_b k_b offset hash_orig)) //-- //-- Loop_body0 val va_code_Loop_body0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_body0 () = (va_Block (va_CCons (va_code_Loop_rounds ()) (va_CNil ()))) val va_codegen_success_Loop_body0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_body0 () = (va_pbool_and (va_codegen_success_Loop_rounds ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_body0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_body0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 578 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_rounds in_b k_b (count `op_Multiply` 4) hash_orig) (fun (va_s:va_state) _ -> let (count:nat) = count + 1 in va_QEmpty ((count))))) val va_lemma_Loop_body0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_body0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0)) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_body0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_body0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_body0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 576 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ va_get_reg64 rRdx va_s0 > 0 /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ precedes_wrap (va_get_reg64 rRdx va_sM) (va_get_reg64 rRdx va_s0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_body0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_body0 (va_code_Loop_body0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_body0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_body0 ())) = (va_QProc (va_code_Loop_body0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_body0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop_while0 val va_code_Loop_while0 : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop_while0 () = (va_Block (va_CCons (va_While (va_cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (va_Block (va_CCons (va_code_Loop_body0 ()) (va_CNil ())))) (va_CNil ()))) val va_codegen_success_Loop_while0 : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop_while0 () = (va_pbool_and (va_codegen_success_Loop_body0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop_while0 (va_mods:va_mods_t) (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode (nat) (va_code_Loop_while0 ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = va_in_hash_orig in let (in_b:buffer128) = va_in_in_b in let (k_b:buffer128) = va_in_k_b in let (count:nat) = va_in_count in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qWhile va_mods (Cmp_gt (va_op_cmp_reg64 rRdx) (va_const_cmp 0)) (fun va_g -> let (count:nat) = let count = va_g in count in qblock va_mods (fun (va_s:va_state) -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_body0 va_old hash_orig in_b k_b count) (fun (va_s:va_state) (count:nat) -> va_QEmpty ((count))))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_ok va_s /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRsi va_old) in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s) (va_get_reg64 rRcx va_s) k_b 16 (va_get_mem_layout va_s) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_s == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_orig)) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in va_get_reg64 rRdx va_s) ((count))) (fun (va_s:va_state) va_g -> let (count:nat) = let count = va_g in count in let va_g = (count) in let (count:nat) = va_g in va_QEmpty ((count))))) val va_lemma_Loop_while0 : va_b0:va_code -> va_s0:va_state -> va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> Ghost (va_state & va_fuel & nat) (requires (va_require_total va_b0 (va_code_Loop_while0 ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig))) (ensures (fun (va_sM, va_fM, count) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) /\ va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop_while0 va_b0 va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count = let va_old = va_expand_state va_old in let (va_mods:va_mods_t) = [va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags] in let va_qc = va_qcode_Loop_while0 va_mods va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop_while0 ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let count = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 558 column 39 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (sha_enabled /\ sse_enabled) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 560 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 561 column 86 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 563 column 47 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 565 column 36 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 566 column 43 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 568 column 78 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 569 column 76 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 571 column 49 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 575 column 77 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (~(va_get_reg64 rRdx va_sM > 0))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let count = va_g in (va_sM, va_fM, count) [@ va_qattr] let va_wp_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) (va_s0:va_state) (va_k:(va_state -> nat -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) va_in_k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_s0 == va_get_reg64 rRdx va_old - va_in_count /\ va_get_reg64 rRsi va_s0 == va_get_reg64 rRsi va_old + 64 `op_Multiply` va_in_count /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) va_in_in_b) 0 (va_in_count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ (forall (va_x_efl:Vale.X64.Flags.t) (va_x_ok:bool) (va_x_rdx:nat64) (va_x_rsi:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm10:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (count:nat) . let va_sM = va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRsi va_x_rsi (va_upd_reg64 rRdx va_x_rdx (va_upd_ok va_x_ok (va_upd_flags va_x_efl va_s0))))))))))))) in va_get_ok va_sM /\ (sha_enabled /\ sse_enabled) /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRsi va_old) va_in_in_b (4 `op_Multiply` va_get_reg64 rRdx va_old) (va_get_mem_layout va_sM) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_sM) (va_get_reg64 rRcx va_sM) va_in_k_b 16 (va_get_mem_layout va_sM) Secret /\ va_get_reg64 rRsi va_old + 64 `op_Multiply` va_get_reg64 rRdx va_old < pow2_64 /\ va_get_reg64 rRdx va_sM == va_get_reg64 rRdx va_old - count /\ va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_old + 64 `op_Multiply` count /\ va_get_xmm 7 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_sM == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_k_b) /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) va_in_in_b) 0 (count `op_Multiply` 4) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE va_in_hash_orig) /\ ~(va_get_reg64 rRdx va_sM > 0) ==> va_k va_sM ((count)))) val va_wpProof_Loop_while0 : va_old:va_state -> va_in_hash_orig:hash256 -> va_in_in_b:buffer128 -> va_in_k_b:buffer128 -> va_in_count:nat -> va_s0:va_state -> va_k:(va_state -> nat -> Type0) -> Ghost (va_state & va_fuel & nat) (requires (va_t_require va_s0 /\ va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count va_s0 va_k = let (va_sM, va_f0, count) = va_lemma_Loop_while0 (va_code_Loop_while0 ()) va_s0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 10 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_ok va_sM (va_update_flags va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) va_sM va_s0; let va_g = (count) in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop_while0 (va_old:va_state) (va_in_hash_orig:hash256) (va_in_in_b:buffer128) (va_in_k_b:buffer128) (va_in_count:nat) : (va_quickCode nat (va_code_Loop_while0 ())) = (va_QProc (va_code_Loop_while0 ()) ([va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 10; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRsi; va_Mod_reg64 rRdx; va_Mod_ok; va_Mod_flags]) (va_wp_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count) (va_wpProof_Loop_while0 va_old va_in_hash_orig va_in_in_b va_in_k_b va_in_count)) //-- //-- Loop val va_code_Loop : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Loop () = (va_Block (va_CCons (va_code_Loop_while0 ()) (va_CNil ()))) val va_codegen_success_Loop : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Loop () = (va_pbool_and (va_codegen_success_Loop_while0 ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Loop (va_mods:va_mods_t) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (hash_orig:hash256) = Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s) (va_get_xmm 2 va_s) in let (count:nat) = 0 in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 556 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop_while0 va_old_s hash_orig in_b k_b count) (fun (va_s:va_state) count -> va_QEmpty (())))) val va_lemma_Loop : va_b0:va_code -> va_s0:va_state -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Loop ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0)))))))))))))))) [@"opaque_to_smt"] let va_lemma_Loop va_b0 va_s0 in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok] in let va_qc = va_qcode_Loop va_mods in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Loop ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 521 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 547 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 548 column 17 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRdx va_sM == 0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 551 column 90 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0))))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Loop (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ va_get_xmm 7 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ va_get_xmm 8 va_s0 == Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 66051 67438087 134810123 202182159 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi va_s0)))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ va_get_reg64 rRdx va_sM == 0 /\ (let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_sM) (va_get_xmm 2 va_sM) == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0)))) ==> va_k va_sM (()))) val va_wpProof_Loop : in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Loop in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Loop in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Loop (va_code_Loop ()) va_s0 in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM va_s0))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Loop (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Loop ())) = (va_QProc (va_code_Loop ()) ([va_Mod_flags; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi]) (va_wp_Loop in_b k_b) (va_wpProof_Loop in_b k_b)) //-- //-- Epilogue val va_code_Epilogue : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Epilogue () = (va_Block (va_CCons (va_code_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_CCons (va_code_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_CCons (va_code_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_CCons (va_code_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_CCons (va_code_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_CNil ()))))))))) val va_codegen_success_Epilogue : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Epilogue () = (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_pbool_and (va_codegen_success_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_pbool_and (va_codegen_success_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_pbool_and (va_codegen_success_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret) (va_pbool_and (va_codegen_success_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret) (va_ttrue ())))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Epilogue (va_mods:va_mods_t) (ctx_b:buffer128) : (va_quickCode unit (va_code_Epilogue ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 612 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 2) (va_op_xmm_xmm 2) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 613 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 7) (va_op_xmm_xmm 1) 27) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 614 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pshufd (va_op_xmm_xmm 1) (va_op_xmm_xmm 1) 177) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 616 column 11 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Shufpd (va_op_xmm_xmm 1) (va_op_xmm_xmm 2) 3) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 617 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Palignr8 (va_op_xmm_xmm 2) (va_op_xmm_xmm 7)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 619 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 1) 0 Secret ctx_b 0) (va_QBind va_range1 "***** PRECONDITION NOT MET AT line 620 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Store128_buffer (va_op_heaplet_mem_heaplet 0) (va_op_reg_opr64_reg64 rRdi) (va_op_xmm_xmm 2) 16 Secret ctx_b 1) (fun (va_s:va_state) _ -> let (abcd:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s) in let (efgh:Vale.X64.Decls.quad32) = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s) in va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 623 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (FStar.Seq.Base.equal #Vale.SHA.SHA_helpers.word (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_old_s) (va_get_xmm 2 va_old_s)) (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) (va_QEmpty (()))))))))))) val va_lemma_Epilogue : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Epilogue ()) va_s0 /\ va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))) [@"opaque_to_smt"] let va_lemma_Epilogue va_b0 va_s0 ctx_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Epilogue va_mods ctx_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Epilogue ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 583 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 603 column 73 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 606 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Epilogue (ctx_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sse_enabled /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret) /\ (forall (va_x_mem:vale_heap) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm7:quad32) (va_x_heap0:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_mem va_x_mem va_s0))))) in va_get_ok va_sM /\ ((let abcd = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).hi3) ((va_get_xmm 1 va_s0).hi2) ((va_get_xmm 2 va_s0).hi3) ((va_get_xmm 2 va_s0).hi2) in let efgh = Vale.Def.Words_s.Mkfour #Vale.Def.Types_s.nat32 ((va_get_xmm 1 va_s0).lo1) ((va_get_xmm 1 va_s0).lo0) ((va_get_xmm 2 va_s0).lo1) ((va_get_xmm 2 va_s0).lo0) in l_and (l_and (abcd == Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM)) (efgh == Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM))) (Vale.SHA.SHA_helpers.make_hash (va_get_xmm 1 va_s0) (va_get_xmm 2 va_s0) == Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) ==> va_k va_sM (()))) val va_wpProof_Epilogue : ctx_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Epilogue ctx_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Epilogue ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Epilogue ctx_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Epilogue (va_code_Epilogue ()) va_s0 ctx_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 7 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Epilogue (ctx_b:buffer128) : (va_quickCode unit (va_code_Epilogue ())) = (va_QProc (va_code_Epilogue ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 7; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_mem]) (va_wp_Epilogue ctx_b) (va_wpProof_Epilogue ctx_b)) //-- //-- Sha_update val va_code_Sha_update : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Sha_update () = (va_Block (va_CCons (va_code_Preamble ()) (va_CCons (va_code_Loop ()) (va_CCons (va_code_Epilogue ()) (va_CNil ()))))) val va_codegen_success_Sha_update : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Sha_update () = (va_pbool_and (va_codegen_success_Preamble ()) (va_pbool_and (va_codegen_success_Loop ()) (va_pbool_and (va_codegen_success_Epilogue ()) (va_ttrue ())))) [@ "opaque_to_smt" va_qattr] let va_qcode_Sha_update (va_mods:va_mods_t) (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 667 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Preamble ctx_b) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 668 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Loop in_b k_b) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 669 column 13 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Epilogue ctx_b) (va_QEmpty (())))))) val va_lemma_Sha_update : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Sha_update ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))))))))))))))) [@"opaque_to_smt"] let va_lemma_Sha_update va_b0 va_s0 ctx_b in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Sha_update va_mods ctx_b in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Sha_update ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 627 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 653 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 662 column 103 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 665 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Sha_update (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_mem:vale_heap) (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_heap0:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi (va_upd_mem va_x_mem va_s0)))))))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let abcd = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_s0) in let efgh = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_s0) in let abcd' = Vale.X64.Decls.buffer128_read ctx_b 0 (va_get_mem_heaplet 0 va_sM) in let efgh' = Vale.X64.Decls.buffer128_read ctx_b 1 (va_get_mem_heaplet 0 va_sM) in let input_LE = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_s0) in let input_BE = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in Vale.SHA.SHA_helpers.make_ordered_hash abcd' efgh' == Vale.SHA.SHA_helpers.update_multi_quads input_BE (Vale.SHA.SHA_helpers.make_ordered_hash abcd efgh)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)) ==> va_k va_sM (()))) val va_wpProof_Sha_update : ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Sha_update ctx_b in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Sha_update ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Sha_update ctx_b in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Sha_update (va_code_Sha_update ()) va_s0 ctx_b in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Sha_update (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update ())) = (va_QProc (va_code_Sha_update ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) (va_wp_Sha_update ctx_b in_b k_b) (va_wpProof_Sha_update ctx_b in_b k_b)) //-- //-- Sha_update_bytes #push-options "--z3rlimit 80" #restart-solver val va_code_Sha_update_bytes : va_dummy:unit -> Tot va_code [@ "opaque_to_smt" va_qattr] let va_code_Sha_update_bytes () = (va_Block (va_CCons (va_code_Sha_update ()) (va_CCons (va_Block (va_CNil ())) (va_CNil ())))) val va_codegen_success_Sha_update_bytes : va_dummy:unit -> Tot va_pbool [@ "opaque_to_smt" va_qattr] let va_codegen_success_Sha_update_bytes () = (va_pbool_and (va_codegen_success_Sha_update ()) (va_ttrue ())) [@ "opaque_to_smt" va_qattr] let va_qcode_Sha_update_bytes (va_mods:va_mods_t) (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update_bytes ())) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 714 column 15 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sha_update ctx_b in_b k_b) (fun (va_s:va_state) _ -> let (old_ctx:(seq (four nat32))) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_old_s) ctx_b in let (new_ctx:(seq (four nat32))) = Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) ctx_b in let (va_arg34:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = old_ctx in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 717 column 24 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_hash_to_bytes va_arg34) (let (va_arg33:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = new_ctx in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 718 column 24 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_hash_to_bytes va_arg33) (let (hash_in:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes old_ctx) in let (hash_out:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes new_ctx) in va_qAssertSquash va_range1 "***** EXPRESSION PRECONDITIONS NOT MET WITHIN line 728 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" ((fun a_1582 (s_1583:(FStar.Seq.Base.seq a_1582)) (i_1584:Prims.nat) (j_1585:Prims.nat) -> let (j_1545:Prims.nat) = j_1585 in Prims.b2t (Prims.op_AmpAmp (Prims.op_LessThanOrEqual i_1584 j_1545) (Prims.op_LessThanOrEqual j_1545 (FStar.Seq.Base.length #a_1582 s_1583)))) Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_old_s)) (fun _ -> let (input_LE:(FStar.Seq.Base.seq Vale.X64.Decls.quad32)) = FStar.Seq.Base.slice #Vale.X64.Decls.quad32 (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b) 0 (4 `op_Multiply` va_get_reg64 rRdx va_old_s) in let (input_BE:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = Vale.Arch.Types.reverse_bytes_nat32_quad32_seq input_LE in va_qAssert va_range1 "***** PRECONDITION NOT MET AT line 730 column 5 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (hash_out == Vale.SHA.SHA_helpers.update_multi_quads input_BE hash_in) (let (va_arg32:(FStar.Seq.Base.seq Vale.SHA.SHA_helpers.byte)) = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes input_LE) in let (va_arg31:(FStar.Seq.Base.seq Vale.Def.Words_s.nat8)) = Vale.Def.Types_s.le_seq_quad32_to_bytes input_LE in let (va_arg30:(FStar.Seq.Base.seq Vale.Def.Types_s.quad32)) = input_LE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 731 column 34 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_equiv_vale hash_in hash_out va_arg30 input_BE va_arg31 va_arg32) (va_QEmpty (()))))))))) val va_lemma_Sha_update_bytes : va_b0:va_code -> va_s0:va_state -> ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Sha_update_bytes ()) va_s0 /\ va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 ctx_b == 2 /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 in_b == 4 `op_Multiply` va_get_reg64 rRdx va_s0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let hash_in = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) ctx_b)) in let hash_out = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) ctx_b)) in (let input_LE = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b)) in l_and (FStar.Seq.Base.length #FStar.UInt8.t input_LE `op_Modulus` 64 == 0) (hash_out == Vale.SHA.SHA_helpers.update_multi_opaque_vale hash_in input_LE)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM))) /\ va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))))))))))))))) [@"opaque_to_smt"] let va_lemma_Sha_update_bytes va_b0 va_s0 ctx_b in_b k_b = let (va_mods:va_mods_t) = [va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem] in let va_qc = va_qcode_Sha_update_bytes va_mods ctx_b in_b k_b in let (va_sM, va_fM, va_g) = va_wp_sound_code_norm (va_code_Sha_update_bytes ()) va_qc va_s0 (fun va_s0 va_sM va_g -> let () = va_g in label va_range1 "***** POSTCONDITION NOT MET AT line 672 column 1 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_ok va_sM) /\ (label va_range1 "***** POSTCONDITION NOT MET AT line 702 column 40 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 704 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_in = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) ctx_b)) in label va_range1 "***** POSTCONDITION NOT MET AT line 705 column 9 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let hash_out = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) ctx_b)) in label va_range1 "***** POSTCONDITION NOT MET AT line 709 column 64 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (let input_LE = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b)) in l_and (FStar.Seq.Base.length #FStar.UInt8.t input_LE `op_Modulus` 64 == 0) (hash_out == Vale.SHA.SHA_helpers.update_multi_opaque_vale hash_in input_LE)) /\ label va_range1 "***** POSTCONDITION NOT MET AT line 712 column 53 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM)))))) in assert_norm (va_qc.mods == va_mods); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_ok; va_Mod_mem]) va_sM va_s0; (va_sM, va_fM) [@ va_qattr] let va_wp_Sha_update_bytes (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) (va_s0:va_state) (va_k:(va_state -> unit -> Type0)) : Type0 = (va_get_ok va_s0 /\ (sha_enabled /\ sse_enabled /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRsi va_s0) in_b (4 `op_Multiply` va_get_reg64 rRdx va_s0) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRdi va_s0) ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem_heaplet 0 va_s0) (va_get_reg64 rRcx va_s0) k_b 16 (va_get_mem_layout va_s0) Secret /\ va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 ctx_b == 2 /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 in_b == 4 `op_Multiply` va_get_reg64 rRdx va_s0 /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) k_b)) /\ (forall (va_x_mem:vale_heap) (va_x_rsi:nat64) (va_x_rdx:nat64) (va_x_rax:nat64) (va_x_xmm0:quad32) (va_x_xmm1:quad32) (va_x_xmm2:quad32) (va_x_xmm3:quad32) (va_x_xmm4:quad32) (va_x_xmm5:quad32) (va_x_xmm6:quad32) (va_x_xmm7:quad32) (va_x_xmm8:quad32) (va_x_xmm9:quad32) (va_x_xmm10:quad32) (va_x_heap0:vale_heap) (va_x_efl:Vale.X64.Flags.t) . let va_sM = va_upd_flags va_x_efl (va_upd_mem_heaplet 0 va_x_heap0 (va_upd_xmm 10 va_x_xmm10 (va_upd_xmm 9 va_x_xmm9 (va_upd_xmm 8 va_x_xmm8 (va_upd_xmm 7 va_x_xmm7 (va_upd_xmm 6 va_x_xmm6 (va_upd_xmm 5 va_x_xmm5 (va_upd_xmm 4 va_x_xmm4 (va_upd_xmm 3 va_x_xmm3 (va_upd_xmm 2 va_x_xmm2 (va_upd_xmm 1 va_x_xmm1 (va_upd_xmm 0 va_x_xmm0 (va_upd_reg64 rRax va_x_rax (va_upd_reg64 rRdx va_x_rdx (va_upd_reg64 rRsi va_x_rsi (va_upd_mem va_x_mem va_s0)))))))))))))))) in va_get_ok va_sM /\ (va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0 + 64 `op_Multiply` va_get_reg64 rRdx va_s0 /\ (let hash_in = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s0) ctx_b)) in let hash_out = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) ctx_b)) in (let input_LE = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_sM) in_b)) in l_and (FStar.Seq.Base.length #FStar.UInt8.t input_LE `op_Modulus` 64 == 0) (hash_out == Vale.SHA.SHA_helpers.update_multi_opaque_vale hash_in input_LE)) /\ Vale.X64.Decls.modifies_buffer128 ctx_b (va_get_mem_heaplet 0 va_s0) (va_get_mem_heaplet 0 va_sM))) ==> va_k va_sM (()))) val va_wpProof_Sha_update_bytes : ctx_b:buffer128 -> in_b:buffer128 -> k_b:buffer128 -> va_s0:va_state -> va_k:(va_state -> unit -> Type0) -> Ghost (va_state & va_fuel & unit) (requires (va_t_require va_s0 /\ va_wp_Sha_update_bytes ctx_b in_b k_b va_s0 va_k)) (ensures (fun (va_sM, va_f0, va_g) -> va_t_ensure (va_code_Sha_update_bytes ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_s0 va_k ((va_sM, va_f0, va_g)))) [@"opaque_to_smt"] let va_wpProof_Sha_update_bytes ctx_b in_b k_b va_s0 va_k = let (va_sM, va_f0) = va_lemma_Sha_update_bytes (va_code_Sha_update_bytes ()) va_s0 ctx_b in_b k_b in va_lemma_upd_update va_sM; assert (va_state_eq va_sM (va_update_flags va_sM (va_update_mem_heaplet 0 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rRax va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRsi va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0))))))))))))))))))); va_lemma_norm_mods ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) va_sM va_s0; let va_g = () in (va_sM, va_f0, va_g) [@ "opaque_to_smt" va_qattr] let va_quick_Sha_update_bytes (ctx_b:buffer128) (in_b:buffer128) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update_bytes ())) = (va_QProc (va_code_Sha_update_bytes ()) ([va_Mod_flags; va_Mod_mem_heaplet 0; va_Mod_xmm 10; va_Mod_xmm 9; va_Mod_xmm 8; va_Mod_xmm 7; va_Mod_xmm 6; va_Mod_xmm 5; va_Mod_xmm 4; va_Mod_xmm 3; va_Mod_xmm 2; va_Mod_xmm 1; va_Mod_xmm 0; va_Mod_reg64 rRax; va_Mod_reg64 rRdx; va_Mod_reg64 rRsi; va_Mod_mem]) (va_wp_Sha_update_bytes ctx_b in_b k_b) (va_wpProof_Sha_update_bytes ctx_b in_b k_b)) #pop-options //-- //-- Sha_update_bytes_stdcall #push-options "--z3rlimit 80" #restart-solver [@ "opaque_to_smt" va_qattr] let va_code_Sha_update_bytes_stdcall win = (va_Block (va_CCons (va_code_CreateHeaplets ()) (va_CCons (if win then va_Block (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 15) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 14) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 13) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 12) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 11) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 10) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 9) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 8) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PushXmm_Secret (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR15)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR14)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR13)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR12)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRsi)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRdi)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRbp)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRbx)) (va_CNil ()))))))))))))))))))) else va_Block (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR15)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR14)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR13)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rR12)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRsi)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRdi)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRbp)) (va_CCons (va_code_Push_Secret (va_op_reg_opr64_reg64 rRbx)) (va_CNil ())))))))))) (va_CCons (if win then va_Block (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRdi) (va_op_opr64_reg64 rRcx)) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRsi) (va_op_opr64_reg64 rRdx)) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRdx) (va_op_opr64_reg64 rR8)) (va_CCons (va_code_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_op_opr64_reg64 rR9)) (va_CNil ()))))) else va_Block (va_CNil ())) (va_CCons (va_code_Sha_update_bytes ()) (va_CCons (if win then va_Block (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRbx)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRbp)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRdi)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRsi)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR12)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR13)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR14)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR15)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 8) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 9) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 10) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 11) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 12) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 13) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 14) (va_op_reg_opr64_reg64 rRax)) (va_CCons (va_code_PopXmm_Secret (va_op_xmm_xmm 15) (va_op_reg_opr64_reg64 rRax)) (va_CNil ()))))))))))))))))))) else va_Block (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRbx)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRbp)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRdi)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rRsi)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR12)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR13)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR14)) (va_CCons (va_code_Pop_Secret (va_op_dst_opr64_reg64 rR15)) (va_CNil ())))))))))) (va_CCons (va_code_DestroyHeaplets ()) (va_CNil ())))))))) [@ "opaque_to_smt" va_qattr] let va_codegen_success_Sha_update_bytes_stdcall win = (va_pbool_and (va_codegen_success_CreateHeaplets ()) (va_pbool_and (if win then va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 15) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 14) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 13) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 12) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 11) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 10) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 9) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 8) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PushXmm_Secret (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rR15)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rR14)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rR13)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rR12)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rRsi)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rRdi)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rRbp)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rRbx)) (va_ttrue ())))))))))))))))))) else va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rR15)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rR14)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rR13)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rR12)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rRsi)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rRdi)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rRbp)) (va_pbool_and (va_codegen_success_Push_Secret (va_op_reg_opr64_reg64 rRbx)) (va_ttrue ()))))))))) (va_pbool_and (if win then va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRdi) (va_op_opr64_reg64 rRcx)) (va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRsi) (va_op_opr64_reg64 rRdx)) (va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRdx) (va_op_opr64_reg64 rR8)) (va_pbool_and (va_codegen_success_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_op_opr64_reg64 rR9)) (va_ttrue ())))) else va_ttrue ()) (va_pbool_and (va_codegen_success_Sha_update_bytes ()) (va_pbool_and (if win then va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rRbp)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rRdi)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rRsi)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rR12)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rR13)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rR14)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rR15)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 8) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 9) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 10) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 11) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 12) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 13) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 14) (va_op_reg_opr64_reg64 rRax)) (va_pbool_and (va_codegen_success_PopXmm_Secret (va_op_xmm_xmm 15) (va_op_reg_opr64_reg64 rRax)) (va_ttrue ())))))))))))))))))) else va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rRbx)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rRbp)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rRdi)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rRsi)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rR12)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rR13)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rR14)) (va_pbool_and (va_codegen_success_Pop_Secret (va_op_dst_opr64_reg64 rR15)) (va_ttrue ()))))))))) (va_pbool_and (va_codegen_success_DestroyHeaplets ()) (va_ttrue ()))))))) [@ "opaque_to_smt" va_qattr] let va_qcode_Sha_update_bytes_stdcall (va_mods:va_mods_t) (win:bool) (ctx_b:buffer128) (in_b:buffer128) (num_val:nat64) (k_b:buffer128) : (va_quickCode unit (va_code_Sha_update_bytes_stdcall win)) = (qblock va_mods (fun (va_s:va_state) -> let (va_old_s:va_state) = va_s in let (ctx_ptr:(va_int_range 0 18446744073709551615)) = va_if win (fun _ -> va_get_reg64 rRcx va_s) (fun _ -> va_get_reg64 rRdi va_s) in let (in_ptr:(va_int_range 0 18446744073709551615)) = va_if win (fun _ -> va_get_reg64 rRdx va_s) (fun _ -> va_get_reg64 rRsi va_s) in let (num:(va_int_range 0 18446744073709551615)) = va_if win (fun _ -> va_get_reg64 rR8 va_s) (fun _ -> va_get_reg64 rRdx va_s) in let (k_ptr:(va_int_range 0 18446744073709551615)) = va_if win (fun _ -> va_get_reg64 rR9 va_s) (fun _ -> va_get_reg64 rRcx va_s) in va_QBind va_range1 "***** PRECONDITION NOT MET AT line 813 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_CreateHeaplets ([declare_buffer128 in_b 0 Secret Immutable; declare_buffer128 k_b 0 Secret Immutable; declare_buffer128 ctx_b 0 Secret Mutable])) (fun (va_s:va_state) _ -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 819 column 15 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qInlineIf va_mods win (qblock va_mods (fun (va_s:va_state) -> va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 821 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PushXmm_Secret (va_op_xmm_xmm 15) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 822 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PushXmm_Secret (va_op_xmm_xmm 14) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 823 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PushXmm_Secret (va_op_xmm_xmm 13) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 824 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PushXmm_Secret (va_op_xmm_xmm 12) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 825 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PushXmm_Secret (va_op_xmm_xmm 11) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 826 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PushXmm_Secret (va_op_xmm_xmm 10) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 827 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PushXmm_Secret (va_op_xmm_xmm 9) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 828 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PushXmm_Secret (va_op_xmm_xmm 8) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 829 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PushXmm_Secret (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 830 column 23 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PushXmm_Secret (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRax)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 831 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rR15)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 832 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rR14)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 833 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rR13)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 834 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rR12)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 835 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rRsi)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 836 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rRdi)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 837 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rRbp)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 838 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rRbx)) (va_QEmpty (()))))))))))))))))))))) (qblock va_mods (fun (va_s:va_state) -> va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 842 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rR15)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 843 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rR14)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 844 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rR13)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 845 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rR12)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 846 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rRsi)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 847 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rRdi)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 848 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rRbp)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 849 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Push_Secret (va_op_reg_opr64_reg64 rRbx)) (va_QEmpty (())))))))))))) (fun (va_s:va_state) va_g -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 852 column 15 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qInlineIf va_mods win (qblock va_mods (fun (va_s:va_state) -> va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 854 column 14 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov64 (va_op_dst_opr64_reg64 rRdi) (va_op_opr64_reg64 rRcx)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 855 column 14 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov64 (va_op_dst_opr64_reg64 rRsi) (va_op_opr64_reg64 rRdx)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 856 column 14 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov64 (va_op_dst_opr64_reg64 rRdx) (va_op_opr64_reg64 rR8)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 857 column 14 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Mov64 (va_op_dst_opr64_reg64 rRcx) (va_op_opr64_reg64 rR9)) (va_QEmpty (()))))))) (qblock va_mods (fun (va_s:va_state) -> va_QEmpty (())))) (fun (va_s:va_state) va_g -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 860 column 21 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Sha_update_bytes ctx_b in_b k_b) (fun (va_s:va_state) _ -> va_QBind va_range1 "***** PRECONDITION NOT MET AT line 863 column 15 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_qInlineIf va_mods win (qblock va_mods (fun (va_s:va_state) -> va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 864 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rRbx)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 865 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rRbp)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 866 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rRdi)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 867 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rRsi)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 868 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rR12)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 869 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rR13)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 870 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rR14)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 871 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rR15)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 873 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PopXmm_Secret (va_op_xmm_xmm 6) (va_op_reg_opr64_reg64 rRax) (va_get_xmm 6 va_old_s)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 874 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PopXmm_Secret (va_op_xmm_xmm 7) (va_op_reg_opr64_reg64 rRax) (va_get_xmm 7 va_old_s)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 875 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PopXmm_Secret (va_op_xmm_xmm 8) (va_op_reg_opr64_reg64 rRax) (va_get_xmm 8 va_old_s)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 876 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PopXmm_Secret (va_op_xmm_xmm 9) (va_op_reg_opr64_reg64 rRax) (va_get_xmm 9 va_old_s)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 877 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PopXmm_Secret (va_op_xmm_xmm 10) (va_op_reg_opr64_reg64 rRax) (va_get_xmm 10 va_old_s)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 878 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PopXmm_Secret (va_op_xmm_xmm 11) (va_op_reg_opr64_reg64 rRax) (va_get_xmm 11 va_old_s)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 879 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PopXmm_Secret (va_op_xmm_xmm 12) (va_op_reg_opr64_reg64 rRax) (va_get_xmm 12 va_old_s)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 880 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PopXmm_Secret (va_op_xmm_xmm 13) (va_op_reg_opr64_reg64 rRax) (va_get_xmm 13 va_old_s)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 881 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PopXmm_Secret (va_op_xmm_xmm 14) (va_op_reg_opr64_reg64 rRax) (va_get_xmm 14 va_old_s)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 882 column 22 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_PopXmm_Secret (va_op_xmm_xmm 15) (va_op_reg_opr64_reg64 rRax) (va_get_xmm 15 va_old_s)) (va_QEmpty (()))))))))))))))))))))) (qblock va_mods (fun (va_s:va_state) -> va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 886 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rRbx)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 887 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rRbp)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 888 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rRdi)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 889 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rRsi)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 890 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rR12)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 891 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rR13)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 892 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rR14)) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 893 column 19 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_Pop_Secret (va_op_dst_opr64_reg64 rR15)) (va_QEmpty (())))))))))))) (fun (va_s:va_state) va_g -> let (hash_in:Vale.SHA.SHA_helpers.hash256) = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_old_s) ctx_b)) in let (input_LE:(FStar.Seq.Base.seq FStar.UInt8.t)) = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem_heaplet 0 va_s) in_b)) in let (va_arg77:Vale.SHA.SHA_helpers.bytes) = input_LE in va_qPURE va_range1 "***** PRECONDITION NOT MET AT line 898 column 51 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (fun (_:unit) -> Vale.SHA.SHA_helpers.lemma_update_multi_opaque_vale_is_update_multi hash_in va_arg77) (va_QSeq va_range1 "***** PRECONDITION NOT MET AT line 900 column 20 of file /home/gebner/everest/hacl-star/vale/code/thirdPartyPorts/OpenSSL/sha/Vale.SHA.X64.vaf *****" (va_quick_DestroyHeaplets ()) (va_QEmpty (()))))))))))
false
false
Vale.SHA.X64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 0, "max_fuel": 1, "max_ifuel": 1, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": true, "smtencoding_l_arith_repr": "native", "smtencoding_nl_arith_repr": "wrapped", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": false, "z3cliopt": [ "smt.arith.nl=false", "smt.QI.EAGER_THRESHOLD=100", "smt.CASE_SPLIT=3" ], "z3refresh": false, "z3rlimit": 80, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val va_lemma_Sha_update_bytes_stdcall : va_b0:va_code -> va_s0:va_state -> win:bool -> ctx_b:buffer128 -> in_b:buffer128 -> num_val:nat64 -> k_b:buffer128 -> Ghost (va_state & va_fuel) (requires (va_require_total va_b0 (va_code_Sha_update_bytes_stdcall win) va_s0 /\ va_get_ok va_s0 /\ (let (ctx_ptr:(va_int_range 0 18446744073709551615)) = (if win then va_get_reg64 rRcx va_s0 else va_get_reg64 rRdi va_s0) in let (in_ptr:(va_int_range 0 18446744073709551615)) = (if win then va_get_reg64 rRdx va_s0 else va_get_reg64 rRsi va_s0) in let (num:(va_int_range 0 18446744073709551615)) = (if win then va_get_reg64 rR8 va_s0 else va_get_reg64 rRdx va_s0) in let (k_ptr:(va_int_range 0 18446744073709551615)) = (if win then va_get_reg64 rR9 va_s0 else va_get_reg64 rRcx va_s0) in va_get_reg64 rRsp va_s0 == Vale.X64.Stack_i.init_rsp (va_get_stack va_s0) /\ Vale.X64.Memory.is_initial_heap (va_get_mem_layout va_s0) (va_get_mem va_s0) /\ (sha_enabled /\ sse_enabled) /\ l_or (Vale.X64.Decls.locs_disjoint ([Vale.X64.Decls.loc_buffer #Vale.X64.Memory.vuint128 ctx_b; Vale.X64.Decls.loc_buffer #Vale.X64.Memory.vuint128 in_b])) (ctx_b == in_b) /\ l_or (Vale.X64.Decls.locs_disjoint ([Vale.X64.Decls.loc_buffer #Vale.X64.Memory.vuint128 ctx_b; Vale.X64.Decls.loc_buffer #Vale.X64.Memory.vuint128 k_b])) (ctx_b == k_b) /\ l_or (Vale.X64.Decls.locs_disjoint ([Vale.X64.Decls.loc_buffer #Vale.X64.Memory.vuint128 in_b; Vale.X64.Decls.loc_buffer #Vale.X64.Memory.vuint128 k_b])) (in_b == k_b) /\ Vale.X64.Decls.validDstAddrs128 (va_get_mem va_s0) ctx_ptr ctx_b 2 (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem va_s0) in_ptr in_b (4 `op_Multiply` num) (va_get_mem_layout va_s0) Secret /\ Vale.X64.Decls.validSrcAddrs128 (va_get_mem va_s0) k_ptr k_b 16 (va_get_mem_layout va_s0) Secret /\ num_val == num /\ in_ptr + 64 `op_Multiply` num < pow2_64 /\ Vale.X64.Decls.buffers_disjoint128 ctx_b in_b /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 ctx_b == 2 /\ Vale.X64.Decls.buffer_length #Vale.X64.Memory.vuint128 in_b == 4 `op_Multiply` num /\ Vale.SHA.SHA_helpers.k_reqs (Vale.X64.Decls.buffer128_as_seq (va_get_mem va_s0) k_b)))) (ensures (fun (va_sM, va_fM) -> va_ensure_total va_b0 va_s0 va_sM va_fM /\ va_get_ok va_sM /\ (let (ctx_ptr:(va_int_range 0 18446744073709551615)) = (if win then va_get_reg64 rRcx va_s0 else va_get_reg64 rRdi va_s0) in let (in_ptr:(va_int_range 0 18446744073709551615)) = (if win then va_get_reg64 rRdx va_s0 else va_get_reg64 rRsi va_s0) in let (num:(va_int_range 0 18446744073709551615)) = (if win then va_get_reg64 rR8 va_s0 else va_get_reg64 rRdx va_s0) in let (k_ptr:(va_int_range 0 18446744073709551615)) = (if win then va_get_reg64 rR9 va_s0 else va_get_reg64 rRcx va_s0) in let hash_in = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem va_s0) ctx_b)) in let hash_out = Vale.SHA.SHA_helpers.le_bytes_to_hash (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem va_sM) ctx_b)) in (let input_LE = Vale.Def.Words.Seq_s.seq_nat8_to_seq_uint8 (Vale.Def.Types_s.le_seq_quad32_to_bytes (Vale.X64.Decls.buffer128_as_seq (va_get_mem va_sM) in_b)) in l_and (FStar.Seq.Base.length #FStar.UInt8.t input_LE `op_Modulus` 64 == 0) (hash_out == Vale.SHA.SHA_helpers.update_multi_transparent hash_in input_LE)) /\ Vale.X64.Decls.modifies_mem (Vale.X64.Decls.loc_buffer #Vale.X64.Memory.vuint128 ctx_b) (va_get_mem va_s0) (va_get_mem va_sM) /\ va_get_reg64 rRsp va_sM == va_get_reg64 rRsp va_s0 /\ (win ==> va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0) /\ (win ==> va_get_reg64 rRbp va_sM == va_get_reg64 rRbp va_s0) /\ (win ==> va_get_reg64 rRdi va_sM == va_get_reg64 rRdi va_s0) /\ (win ==> va_get_reg64 rRsi va_sM == va_get_reg64 rRsi va_s0) /\ (win ==> va_get_reg64 rR12 va_sM == va_get_reg64 rR12 va_s0) /\ (win ==> va_get_reg64 rR13 va_sM == va_get_reg64 rR13 va_s0) /\ (win ==> va_get_reg64 rR14 va_sM == va_get_reg64 rR14 va_s0) /\ (win ==> va_get_reg64 rR15 va_sM == va_get_reg64 rR15 va_s0) /\ (~win ==> va_get_reg64 rRbx va_sM == va_get_reg64 rRbx va_s0) /\ (~win ==> va_get_reg64 rRbp va_sM == va_get_reg64 rRbp va_s0) /\ (~win ==> va_get_reg64 rR12 va_sM == va_get_reg64 rR12 va_s0) /\ (~win ==> va_get_reg64 rR13 va_sM == va_get_reg64 rR13 va_s0) /\ (~win ==> va_get_reg64 rR14 va_sM == va_get_reg64 rR14 va_s0) /\ (~win ==> va_get_reg64 rR15 va_sM == va_get_reg64 rR15 va_s0) /\ (win ==> va_get_xmm 6 va_sM == va_get_xmm 6 va_s0) /\ (win ==> va_get_xmm 7 va_sM == va_get_xmm 7 va_s0) /\ (win ==> va_get_xmm 8 va_sM == va_get_xmm 8 va_s0) /\ (win ==> va_get_xmm 9 va_sM == va_get_xmm 9 va_s0) /\ (win ==> va_get_xmm 10 va_sM == va_get_xmm 10 va_s0) /\ (win ==> va_get_xmm 11 va_sM == va_get_xmm 11 va_s0) /\ (win ==> va_get_xmm 12 va_sM == va_get_xmm 12 va_s0) /\ (win ==> va_get_xmm 13 va_sM == va_get_xmm 13 va_s0) /\ (win ==> va_get_xmm 14 va_sM == va_get_xmm 14 va_s0) /\ (win ==> va_get_xmm 15 va_sM == va_get_xmm 15 va_s0)) /\ va_state_eq va_sM (va_update_stackTaint va_sM (va_update_stack va_sM (va_update_mem_layout va_sM (va_update_mem_heaplet 0 va_sM (va_update_flags va_sM (va_update_xmm 15 va_sM (va_update_xmm 14 va_sM (va_update_xmm 13 va_sM (va_update_xmm 12 va_sM (va_update_xmm 11 va_sM (va_update_xmm 10 va_sM (va_update_xmm 9 va_sM (va_update_xmm 8 va_sM (va_update_xmm 7 va_sM (va_update_xmm 6 va_sM (va_update_xmm 5 va_sM (va_update_xmm 4 va_sM (va_update_xmm 3 va_sM (va_update_xmm 2 va_sM (va_update_xmm 1 va_sM (va_update_xmm 0 va_sM (va_update_reg64 rR15 va_sM (va_update_reg64 rR14 va_sM (va_update_reg64 rR13 va_sM (va_update_reg64 rR12 va_sM (va_update_reg64 rR11 va_sM (va_update_reg64 rR10 va_sM (va_update_reg64 rR9 va_sM (va_update_reg64 rR8 va_sM (va_update_reg64 rRsp va_sM (va_update_reg64 rRbp va_sM (va_update_reg64 rRdi va_sM (va_update_reg64 rRsi va_sM (va_update_reg64 rRdx va_sM (va_update_reg64 rRcx va_sM (va_update_reg64 rRbx va_sM (va_update_reg64 rRax va_sM (va_update_ok va_sM (va_update_mem va_sM va_s0)))))))))))))))))))))))))))))))))))))))))
[]
Vale.SHA.X64.va_lemma_Sha_update_bytes_stdcall
{ "file_name": "obj/Vale.SHA.X64.fst", "git_rev": "12c5e9539c7e3c366c26409d3b86493548c4483e", "git_url": "https://github.com/hacl-star/hacl-star.git", "project_name": "hacl-star" }
va_b0: Vale.X64.Decls.va_code -> va_s0: Vale.X64.Decls.va_state -> win: Prims.bool -> ctx_b: Vale.X64.Memory.buffer128 -> in_b: Vale.X64.Memory.buffer128 -> num_val: Vale.X64.Memory.nat64 -> k_b: Vale.X64.Memory.buffer128 -> Prims.Ghost (Vale.X64.Decls.va_state * Vale.X64.Decls.va_fuel)
{ "end_col": 16, "end_line": 2901, "start_col": 78, "start_line": 2808 }
Prims.Tot
val v (x:t) : Tot (int_t n)
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.Int", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.Int", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let v x = x.v
val v (x:t) : Tot (int_t n) let v x =
false
null
false
x.v
{ "checked_file": "FStar.Int64.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Math.Lemmas.fst.checked", "FStar.Int.fsti.checked" ], "interface_file": true, "source_file": "FStar.Int64.fst" }
[ "total" ]
[ "FStar.Int64.t", "FStar.Int64.__proj__Mk__item__v", "FStar.Int.int_t", "FStar.Int64.n" ]
[]
(* Copyright 2008-2019 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module FStar.Int64 (**** THIS MODULE IS GENERATED AUTOMATICALLY USING [mk_int.sh], DO NOT EDIT DIRECTLY ****) open FStar.Int open FStar.Mul #set-options "--max_fuel 0 --max_ifuel 0" (* NOTE: anything that you fix/update here should be reflected in [FStar.UIntN.fstp], which is mostly * a copy-paste of this module. *) type t : eqtype = | Mk: v:int_t n -> t
false
true
FStar.Int64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val v (x:t) : Tot (int_t n)
[]
FStar.Int64.v
{ "file_name": "ulib/FStar.Int64.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
x: FStar.Int64.t -> FStar.Int.int_t FStar.Int64.n
{ "end_col": 13, "end_line": 32, "start_col": 10, "start_line": 32 }
Prims.Tot
val zero : x:t{v x = 0}
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.Int", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.Int", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let zero = int_to_t 0
val zero : x:t{v x = 0} let zero =
false
null
false
int_to_t 0
{ "checked_file": "FStar.Int64.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Math.Lemmas.fst.checked", "FStar.Int.fsti.checked" ], "interface_file": true, "source_file": "FStar.Int64.fst" }
[ "total" ]
[ "FStar.Int64.int_to_t" ]
[]
(* Copyright 2008-2019 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module FStar.Int64 (**** THIS MODULE IS GENERATED AUTOMATICALLY USING [mk_int.sh], DO NOT EDIT DIRECTLY ****) open FStar.Int open FStar.Mul #set-options "--max_fuel 0 --max_ifuel 0" (* NOTE: anything that you fix/update here should be reflected in [FStar.UIntN.fstp], which is mostly * a copy-paste of this module. *) type t : eqtype = | Mk: v:int_t n -> t let v x = x.v let int_to_t x = Mk x let uv_inv _ = () let vu_inv _ = () let v_inj _ _ = ()
false
false
FStar.Int64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val zero : x:t{v x = 0}
[]
FStar.Int64.zero
{ "file_name": "ulib/FStar.Int64.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
x: FStar.Int64.t{FStar.Int64.v x = 0}
{ "end_col": 21, "end_line": 42, "start_col": 11, "start_line": 42 }
Prims.Pure
val logor (x:t) (y:t) : Pure t (requires True) (ensures (fun z -> v x `logor` v y == v z))
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.Int", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.Int", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let logor x y = Mk (logor (v x) (v y))
val logor (x:t) (y:t) : Pure t (requires True) (ensures (fun z -> v x `logor` v y == v z)) let logor x y =
false
null
false
Mk (logor (v x) (v y))
{ "checked_file": "FStar.Int64.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Math.Lemmas.fst.checked", "FStar.Int.fsti.checked" ], "interface_file": true, "source_file": "FStar.Int64.fst" }
[]
[ "FStar.Int64.t", "FStar.Int64.Mk", "FStar.Int.logor", "FStar.Int64.n", "FStar.Int64.v" ]
[]
(* Copyright 2008-2019 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module FStar.Int64 (**** THIS MODULE IS GENERATED AUTOMATICALLY USING [mk_int.sh], DO NOT EDIT DIRECTLY ****) open FStar.Int open FStar.Mul #set-options "--max_fuel 0 --max_ifuel 0" (* NOTE: anything that you fix/update here should be reflected in [FStar.UIntN.fstp], which is mostly * a copy-paste of this module. *) type t : eqtype = | Mk: v:int_t n -> t let v x = x.v let int_to_t x = Mk x let uv_inv _ = () let vu_inv _ = () let v_inj _ _ = () let zero = int_to_t 0 let one = FStar.Math.Lemmas.pow2_lt_compat (n - 1) 1; int_to_t 1 let add a b = Mk (add (v a) (v b)) let sub a b = Mk (sub (v a) (v b)) let mul a b = Mk (mul (v a) (v b)) let div a b = Mk (div (v a) (v b)) let rem a b = Mk (mod (v a) (v b)) let logand x y = Mk (logand (v x) (v y)) let logxor x y = Mk (logxor (v x) (v y))
false
false
FStar.Int64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val logor (x:t) (y:t) : Pure t (requires True) (ensures (fun z -> v x `logor` v y == v z))
[]
FStar.Int64.logor
{ "file_name": "ulib/FStar.Int64.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
x: FStar.Int64.t -> y: FStar.Int64.t -> Prims.Pure FStar.Int64.t
{ "end_col": 38, "end_line": 62, "start_col": 16, "start_line": 62 }
Prims.Pure
val sub (a:t) (b:t) : Pure t (requires (size (v a - v b) n)) (ensures (fun c -> v a - v b = v c))
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.Int", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.Int", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let sub a b = Mk (sub (v a) (v b))
val sub (a:t) (b:t) : Pure t (requires (size (v a - v b) n)) (ensures (fun c -> v a - v b = v c)) let sub a b =
false
null
false
Mk (sub (v a) (v b))
{ "checked_file": "FStar.Int64.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Math.Lemmas.fst.checked", "FStar.Int.fsti.checked" ], "interface_file": true, "source_file": "FStar.Int64.fst" }
[]
[ "FStar.Int64.t", "FStar.Int64.Mk", "FStar.Int.sub", "FStar.Int64.n", "FStar.Int64.v" ]
[]
(* Copyright 2008-2019 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module FStar.Int64 (**** THIS MODULE IS GENERATED AUTOMATICALLY USING [mk_int.sh], DO NOT EDIT DIRECTLY ****) open FStar.Int open FStar.Mul #set-options "--max_fuel 0 --max_ifuel 0" (* NOTE: anything that you fix/update here should be reflected in [FStar.UIntN.fstp], which is mostly * a copy-paste of this module. *) type t : eqtype = | Mk: v:int_t n -> t let v x = x.v let int_to_t x = Mk x let uv_inv _ = () let vu_inv _ = () let v_inj _ _ = () let zero = int_to_t 0 let one = FStar.Math.Lemmas.pow2_lt_compat (n - 1) 1; int_to_t 1 let add a b = Mk (add (v a) (v b))
false
false
FStar.Int64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val sub (a:t) (b:t) : Pure t (requires (size (v a - v b) n)) (ensures (fun c -> v a - v b = v c))
[]
FStar.Int64.sub
{ "file_name": "ulib/FStar.Int64.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
a: FStar.Int64.t -> b: FStar.Int64.t -> Prims.Pure FStar.Int64.t
{ "end_col": 34, "end_line": 50, "start_col": 14, "start_line": 50 }
Prims.Tot
val one : x:t{v x = 1}
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.Int", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.Int", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let one = FStar.Math.Lemmas.pow2_lt_compat (n - 1) 1; int_to_t 1
val one : x:t{v x = 1} let one =
false
null
false
FStar.Math.Lemmas.pow2_lt_compat (n - 1) 1; int_to_t 1
{ "checked_file": "FStar.Int64.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Math.Lemmas.fst.checked", "FStar.Int.fsti.checked" ], "interface_file": true, "source_file": "FStar.Int64.fst" }
[ "total" ]
[ "FStar.Int64.int_to_t", "Prims.unit", "FStar.Math.Lemmas.pow2_lt_compat", "Prims.op_Subtraction", "FStar.Int64.n" ]
[]
(* Copyright 2008-2019 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module FStar.Int64 (**** THIS MODULE IS GENERATED AUTOMATICALLY USING [mk_int.sh], DO NOT EDIT DIRECTLY ****) open FStar.Int open FStar.Mul #set-options "--max_fuel 0 --max_ifuel 0" (* NOTE: anything that you fix/update here should be reflected in [FStar.UIntN.fstp], which is mostly * a copy-paste of this module. *) type t : eqtype = | Mk: v:int_t n -> t let v x = x.v let int_to_t x = Mk x let uv_inv _ = () let vu_inv _ = () let v_inj _ _ = () let zero = int_to_t 0
false
false
FStar.Int64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val one : x:t{v x = 1}
[]
FStar.Int64.one
{ "file_name": "ulib/FStar.Int64.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
x: FStar.Int64.t{FStar.Int64.v x = 1}
{ "end_col": 12, "end_line": 46, "start_col": 2, "start_line": 45 }
Prims.Pure
val add (a:t) (b:t) : Pure t (requires (size (v a + v b) n)) (ensures (fun c -> v a + v b = v c))
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.Int", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.Int", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let add a b = Mk (add (v a) (v b))
val add (a:t) (b:t) : Pure t (requires (size (v a + v b) n)) (ensures (fun c -> v a + v b = v c)) let add a b =
false
null
false
Mk (add (v a) (v b))
{ "checked_file": "FStar.Int64.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Math.Lemmas.fst.checked", "FStar.Int.fsti.checked" ], "interface_file": true, "source_file": "FStar.Int64.fst" }
[]
[ "FStar.Int64.t", "FStar.Int64.Mk", "FStar.Int.add", "FStar.Int64.n", "FStar.Int64.v" ]
[]
(* Copyright 2008-2019 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module FStar.Int64 (**** THIS MODULE IS GENERATED AUTOMATICALLY USING [mk_int.sh], DO NOT EDIT DIRECTLY ****) open FStar.Int open FStar.Mul #set-options "--max_fuel 0 --max_ifuel 0" (* NOTE: anything that you fix/update here should be reflected in [FStar.UIntN.fstp], which is mostly * a copy-paste of this module. *) type t : eqtype = | Mk: v:int_t n -> t let v x = x.v let int_to_t x = Mk x let uv_inv _ = () let vu_inv _ = () let v_inj _ _ = () let zero = int_to_t 0 let one = FStar.Math.Lemmas.pow2_lt_compat (n - 1) 1; int_to_t 1
false
false
FStar.Int64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val add (a:t) (b:t) : Pure t (requires (size (v a + v b) n)) (ensures (fun c -> v a + v b = v c))
[]
FStar.Int64.add
{ "file_name": "ulib/FStar.Int64.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
a: FStar.Int64.t -> b: FStar.Int64.t -> Prims.Pure FStar.Int64.t
{ "end_col": 34, "end_line": 48, "start_col": 14, "start_line": 48 }
Prims.Pure
val mul (a:t) (b:t) : Pure t (requires (size (v a * v b) n)) (ensures (fun c -> v a * v b = v c))
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.Int", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.Int", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let mul a b = Mk (mul (v a) (v b))
val mul (a:t) (b:t) : Pure t (requires (size (v a * v b) n)) (ensures (fun c -> v a * v b = v c)) let mul a b =
false
null
false
Mk (mul (v a) (v b))
{ "checked_file": "FStar.Int64.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Math.Lemmas.fst.checked", "FStar.Int.fsti.checked" ], "interface_file": true, "source_file": "FStar.Int64.fst" }
[]
[ "FStar.Int64.t", "FStar.Int64.Mk", "FStar.Int.mul", "FStar.Int64.n", "FStar.Int64.v" ]
[]
(* Copyright 2008-2019 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module FStar.Int64 (**** THIS MODULE IS GENERATED AUTOMATICALLY USING [mk_int.sh], DO NOT EDIT DIRECTLY ****) open FStar.Int open FStar.Mul #set-options "--max_fuel 0 --max_ifuel 0" (* NOTE: anything that you fix/update here should be reflected in [FStar.UIntN.fstp], which is mostly * a copy-paste of this module. *) type t : eqtype = | Mk: v:int_t n -> t let v x = x.v let int_to_t x = Mk x let uv_inv _ = () let vu_inv _ = () let v_inj _ _ = () let zero = int_to_t 0 let one = FStar.Math.Lemmas.pow2_lt_compat (n - 1) 1; int_to_t 1 let add a b = Mk (add (v a) (v b)) let sub a b = Mk (sub (v a) (v b))
false
false
FStar.Int64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val mul (a:t) (b:t) : Pure t (requires (size (v a * v b) n)) (ensures (fun c -> v a * v b = v c))
[]
FStar.Int64.mul
{ "file_name": "ulib/FStar.Int64.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
a: FStar.Int64.t -> b: FStar.Int64.t -> Prims.Pure FStar.Int64.t
{ "end_col": 34, "end_line": 52, "start_col": 14, "start_line": 52 }
Prims.Pure
val logxor (x:t) (y:t) : Pure t (requires True) (ensures (fun z -> v x `logxor` v y == v z))
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.Int", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.Int", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let logxor x y = Mk (logxor (v x) (v y))
val logxor (x:t) (y:t) : Pure t (requires True) (ensures (fun z -> v x `logxor` v y == v z)) let logxor x y =
false
null
false
Mk (logxor (v x) (v y))
{ "checked_file": "FStar.Int64.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Math.Lemmas.fst.checked", "FStar.Int.fsti.checked" ], "interface_file": true, "source_file": "FStar.Int64.fst" }
[]
[ "FStar.Int64.t", "FStar.Int64.Mk", "FStar.Int.logxor", "FStar.Int64.n", "FStar.Int64.v" ]
[]
(* Copyright 2008-2019 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module FStar.Int64 (**** THIS MODULE IS GENERATED AUTOMATICALLY USING [mk_int.sh], DO NOT EDIT DIRECTLY ****) open FStar.Int open FStar.Mul #set-options "--max_fuel 0 --max_ifuel 0" (* NOTE: anything that you fix/update here should be reflected in [FStar.UIntN.fstp], which is mostly * a copy-paste of this module. *) type t : eqtype = | Mk: v:int_t n -> t let v x = x.v let int_to_t x = Mk x let uv_inv _ = () let vu_inv _ = () let v_inj _ _ = () let zero = int_to_t 0 let one = FStar.Math.Lemmas.pow2_lt_compat (n - 1) 1; int_to_t 1 let add a b = Mk (add (v a) (v b)) let sub a b = Mk (sub (v a) (v b)) let mul a b = Mk (mul (v a) (v b)) let div a b = Mk (div (v a) (v b)) let rem a b = Mk (mod (v a) (v b)) let logand x y = Mk (logand (v x) (v y))
false
false
FStar.Int64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val logxor (x:t) (y:t) : Pure t (requires True) (ensures (fun z -> v x `logxor` v y == v z))
[]
FStar.Int64.logxor
{ "file_name": "ulib/FStar.Int64.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
x: FStar.Int64.t -> y: FStar.Int64.t -> Prims.Pure FStar.Int64.t
{ "end_col": 40, "end_line": 60, "start_col": 17, "start_line": 60 }
Prims.Pure
val lognot (x:t) : Pure t (requires True) (ensures (fun z -> lognot (v x) == v z))
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.Int", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.Int", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let lognot x = Mk (lognot (v x))
val lognot (x:t) : Pure t (requires True) (ensures (fun z -> lognot (v x) == v z)) let lognot x =
false
null
false
Mk (lognot (v x))
{ "checked_file": "FStar.Int64.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Math.Lemmas.fst.checked", "FStar.Int.fsti.checked" ], "interface_file": true, "source_file": "FStar.Int64.fst" }
[]
[ "FStar.Int64.t", "FStar.Int64.Mk", "FStar.Int.lognot", "FStar.Int64.n", "FStar.Int64.v" ]
[]
(* Copyright 2008-2019 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module FStar.Int64 (**** THIS MODULE IS GENERATED AUTOMATICALLY USING [mk_int.sh], DO NOT EDIT DIRECTLY ****) open FStar.Int open FStar.Mul #set-options "--max_fuel 0 --max_ifuel 0" (* NOTE: anything that you fix/update here should be reflected in [FStar.UIntN.fstp], which is mostly * a copy-paste of this module. *) type t : eqtype = | Mk: v:int_t n -> t let v x = x.v let int_to_t x = Mk x let uv_inv _ = () let vu_inv _ = () let v_inj _ _ = () let zero = int_to_t 0 let one = FStar.Math.Lemmas.pow2_lt_compat (n - 1) 1; int_to_t 1 let add a b = Mk (add (v a) (v b)) let sub a b = Mk (sub (v a) (v b)) let mul a b = Mk (mul (v a) (v b)) let div a b = Mk (div (v a) (v b)) let rem a b = Mk (mod (v a) (v b)) let logand x y = Mk (logand (v x) (v y)) let logxor x y = Mk (logxor (v x) (v y)) let logor x y = Mk (logor (v x) (v y))
false
false
FStar.Int64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val lognot (x:t) : Pure t (requires True) (ensures (fun z -> lognot (v x) == v z))
[]
FStar.Int64.lognot
{ "file_name": "ulib/FStar.Int64.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
x: FStar.Int64.t -> Prims.Pure FStar.Int64.t
{ "end_col": 32, "end_line": 64, "start_col": 15, "start_line": 64 }
Prims.Pure
val shift_right (a:t) (s:UInt32.t) : Pure t (requires (0 <= v a /\ UInt32.v s < n)) (ensures (fun c -> FStar.Int.shift_right (v a) (UInt32.v s) = v c))
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.Int", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.Int", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let shift_right a s = Mk (shift_right (v a) (UInt32.v s))
val shift_right (a:t) (s:UInt32.t) : Pure t (requires (0 <= v a /\ UInt32.v s < n)) (ensures (fun c -> FStar.Int.shift_right (v a) (UInt32.v s) = v c)) let shift_right a s =
false
null
false
Mk (shift_right (v a) (UInt32.v s))
{ "checked_file": "FStar.Int64.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Math.Lemmas.fst.checked", "FStar.Int.fsti.checked" ], "interface_file": true, "source_file": "FStar.Int64.fst" }
[]
[ "FStar.Int64.t", "FStar.UInt32.t", "FStar.Int64.Mk", "FStar.Int.shift_right", "FStar.Int64.n", "FStar.Int64.v", "FStar.UInt32.v" ]
[]
(* Copyright 2008-2019 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module FStar.Int64 (**** THIS MODULE IS GENERATED AUTOMATICALLY USING [mk_int.sh], DO NOT EDIT DIRECTLY ****) open FStar.Int open FStar.Mul #set-options "--max_fuel 0 --max_ifuel 0" (* NOTE: anything that you fix/update here should be reflected in [FStar.UIntN.fstp], which is mostly * a copy-paste of this module. *) type t : eqtype = | Mk: v:int_t n -> t let v x = x.v let int_to_t x = Mk x let uv_inv _ = () let vu_inv _ = () let v_inj _ _ = () let zero = int_to_t 0 let one = FStar.Math.Lemmas.pow2_lt_compat (n - 1) 1; int_to_t 1 let add a b = Mk (add (v a) (v b)) let sub a b = Mk (sub (v a) (v b)) let mul a b = Mk (mul (v a) (v b)) let div a b = Mk (div (v a) (v b)) let rem a b = Mk (mod (v a) (v b)) let logand x y = Mk (logand (v x) (v y)) let logxor x y = Mk (logxor (v x) (v y)) let logor x y = Mk (logor (v x) (v y)) let lognot x = Mk (lognot (v x))
false
false
FStar.Int64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val shift_right (a:t) (s:UInt32.t) : Pure t (requires (0 <= v a /\ UInt32.v s < n)) (ensures (fun c -> FStar.Int.shift_right (v a) (UInt32.v s) = v c))
[]
FStar.Int64.shift_right
{ "file_name": "ulib/FStar.Int64.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
a: FStar.Int64.t -> s: FStar.UInt32.t -> Prims.Pure FStar.Int64.t
{ "end_col": 57, "end_line": 66, "start_col": 22, "start_line": 66 }
Prims.Pure
val int_to_t: x:int_t n -> Pure t (requires True) (ensures (fun y -> v y = x))
[ { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.Int", "short_module": null }, { "abbrev": false, "full_module": "FStar.Mul", "short_module": null }, { "abbrev": false, "full_module": "FStar.Int", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null }, { "abbrev": false, "full_module": "FStar.Pervasives", "short_module": null }, { "abbrev": false, "full_module": "Prims", "short_module": null }, { "abbrev": false, "full_module": "FStar", "short_module": null } ]
false
let int_to_t x = Mk x
val int_to_t: x:int_t n -> Pure t (requires True) (ensures (fun y -> v y = x)) let int_to_t x =
false
null
false
Mk x
{ "checked_file": "FStar.Int64.fst.checked", "dependencies": [ "prims.fst.checked", "FStar.UInt32.fsti.checked", "FStar.Pervasives.fsti.checked", "FStar.Mul.fst.checked", "FStar.Math.Lemmas.fst.checked", "FStar.Int.fsti.checked" ], "interface_file": true, "source_file": "FStar.Int64.fst" }
[]
[ "FStar.Int.int_t", "FStar.Int64.n", "FStar.Int64.Mk", "FStar.Int64.t" ]
[]
(* Copyright 2008-2019 Microsoft Research Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) module FStar.Int64 (**** THIS MODULE IS GENERATED AUTOMATICALLY USING [mk_int.sh], DO NOT EDIT DIRECTLY ****) open FStar.Int open FStar.Mul #set-options "--max_fuel 0 --max_ifuel 0" (* NOTE: anything that you fix/update here should be reflected in [FStar.UIntN.fstp], which is mostly * a copy-paste of this module. *) type t : eqtype = | Mk: v:int_t n -> t let v x = x.v
false
false
FStar.Int64.fst
{ "detail_errors": false, "detail_hint_replay": false, "initial_fuel": 2, "initial_ifuel": 1, "max_fuel": 0, "max_ifuel": 0, "no_plugins": false, "no_smt": false, "no_tactics": false, "quake_hi": 1, "quake_keep": false, "quake_lo": 1, "retry": false, "reuse_hint_for": null, "smtencoding_elim_box": false, "smtencoding_l_arith_repr": "boxwrap", "smtencoding_nl_arith_repr": "boxwrap", "smtencoding_valid_elim": false, "smtencoding_valid_intro": true, "tcnorm": true, "trivial_pre_for_unannotated_effectful_fns": true, "z3cliopt": [], "z3refresh": false, "z3rlimit": 5, "z3rlimit_factor": 1, "z3seed": 0, "z3smtopt": [], "z3version": "4.8.5" }
null
val int_to_t: x:int_t n -> Pure t (requires True) (ensures (fun y -> v y = x))
[]
FStar.Int64.int_to_t
{ "file_name": "ulib/FStar.Int64.fst", "git_rev": "f4cbb7a38d67eeb13fbdb2f4fb8a44a65cbcdc1f", "git_url": "https://github.com/FStarLang/FStar.git", "project_name": "FStar" }
x: FStar.Int.int_t FStar.Int64.n -> Prims.Pure FStar.Int64.t
{ "end_col": 21, "end_line": 34, "start_col": 17, "start_line": 34 }